I have this code:
Code: Select all
#k::
IfWinActive, ahk_exe explorer.exe
{
ControlGetText, curPath, Edit1, A
MsgBox, %curPath% ;shows current path
ControlSetText, Edit1, C:\, A
ControlSend, Edit1, {Enter}, A
}
return
First launch:
Shows correct current path, re-addresses to C:\
Second launch:
I browsed to a different folder and launched script but %curPath% shows C:\ and nothing happens
What am I missing?
Many thanks!