Get the execution path of the current applicationTag(s): Powerscript

[PB external function declaration]
FUNCTION int GetModuleFileNameA(&
           ulong hinstModule, &
           REF string lpszPath, &
           ulong cchPath) LIBRARY "kernel32"

[Powerscript]
string ls_Path
unsignedlong lul_handle

ls_Path = space(1024)

lul_handle = Handle(GetApplication())
GetModuleFilenameA(lul_handle, ls_Path, 1024)
MessageBox("CURRENT APPLICATION PATH", ls_Path)



If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2012
[ home ]