You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per a Stack Overflow answer:
I tried using process ID but I think VD.PinWindow doesn't work with it e.g. VD.PinWindow("ahk_id 0xD3854") or VD.PinWindow("ahk_id %this_id%").
Full code used:
#Persistent
; If the script is not elevated, relaunch as administrator and kill current instance
full_command_line := DllCall("GetCommandLine", "str")
if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)"))
{
try ; leads to having the script re-launching itself as administrator
{
if A_IsCompiled
Run *RunAs "%A_ScriptFullPath%" /restart
else
Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%"
}
ExitApp
}
#Include lib\VD.ahk-class_VD\_VD.ahk
WinGet, HWiNFO64List, List, ahk_exe HWiNFO64.EXE
VD.init()
Loop, %HWiNFO64List%
{
this_id := HWiNFO64List%A_Index%
VD.PinWindow("%this_id%")
; MsgBox %this_id%
}
The text was updated successfully, but these errors were encountered:
try VD.PinWindow("ahk_id " this_id)
instead of VD.PinWindow("%this_id%")
this is a scripting error % is not to be used inside quotes
this_id is a variable
this is how you'd write it in javascript: string concatenation VD.PinWindow("ahk_id " + this_id)
this is how you'd write it in ahk: . is string concatenation operator VD.PinWindow("ahk_id " . this_id)
or (concatenation is assumed): VD.PinWindow("ahk_id " this_id)
As per a Stack Overflow answer:
I tried using process ID but I think VD.PinWindow doesn't work with it e.g. VD.PinWindow("ahk_id 0xD3854") or VD.PinWindow("ahk_id %this_id%").
Full code used:
The text was updated successfully, but these errors were encountered: