Code: Select all
^!d::
{
Run C:\Documents\
WinWait, Documents
Gosub, Center
Return
}
Code: Select all
Center:
{
WinGetPos, , , WinW, WinH, A
WinMove, A, , A_ScreenWidth/2-WinW/2, A_ScreenHeight/2-WinH/2-60
Return
}
When it happens, the current windows loses focus after regaining it, so it seems it's trying to open the folder; I think it could depend on WinWait instruction, but I'm not sure: for some reason maybe Run doesn't work, and the script get stuck waiting for the folder; if I change from
Code: Select all
WinWait, Documents
Code: Select all
WinWait, Test
I also tried to open the folder manually, hoping if the issue was the WinWait it'd be solved, but it didn't, I still had to restart Explorer and script.