Search the Community
Showing results for tags '_winapi_getstartupinfo'.
-
In _WinAPI_GetStartupInfo() one gets the data from $tagSTARTUPINFO ( in <WinAPISys.au3> ) and the structure is at https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/ns-processthreadsapi-startupinfow typedef struct _STARTUPINFOW { DWORD cb; LPWSTR lpReserved; LPWSTR lpDesktop; LPWSTR lpTitle; DWORD dwX; DWORD dwY; DWORD dwXSize; DWORD dwYSize; DWORD dwXCountChars; DWORD dwYCountChars; DWORD dwFillAttribute; DWORD dwFlags; WORD wShowWindow; WORD cbReserved2; LPBYTE lpReserved2; HANDLE hStdInput; HANDLE hStdOutput; HANDLE hStdError; } STARTUPINFOW, *LPSTARTUPINFOW; I'd like to read the "LPWSTR lpTitle;" but don't know how to read the string from the pointer. Help. This description above is what am after. I'd like to know if my script loaded from a .lnk or not.
-
Hello, I'd like to determine, "from what shortcut" a compiled autoit script was run. The background is, that several script versions shall be consolidated, an I have no clue, where the users might have placed fileshortcuts to oboslete old script verion names. eg. MyScript.exe, MyScript-1.exe MyScript-2.5.exe And shortcuts might be placed on the userdesktop, alluserdesktop, startup folder or somewhere else in the Start Menu. What I've found so far is the function _WinAPI_GetStartupInfo(). The helpfile is just pointing to MSDN without giving any examples... it's returning a "DLLstruct" -- howto retrieve further info from that type of variable? #include <WinAPISys.au3> #include <Debug.au3> $StartupInfo=_WinAPI_GetStartupInfo() $VarType=VarGetType($StartupInfo) if IsArray($StartupInfo) Then _DebugArrayDisplay($StartupInfo,$VarType) Else MsgBox(0,$VarType,"""" & $StartupInfo & """") EndIf Or maybe there is a better, different approach to get what shortcut from a compiled autoit script was started from? Regards, Rudi.