Send {F5},
PostMessage, 0x111 ...
However, these methods seems to fail in Windows XP: After changing the sincleclick/doubleclick setting ('Single-click to open item' ...) via Registry, F5 can be used in Win8.1 and Win10, but not in Win XP; here the change becomes effective only via Refresh from context menu.
So this is my question:
I know that InvokeVerb can be used to invoke a verb from context menu, or simply sending keystrokes to open context menu and select Refresh. However, I need a solution which is independent of the Windows language. (Also I am not sure that Refresh is the fourth item in the context menu in all Windows languages.)
So I would like to invoke directly, not via context menu, the same action which is done via Refresh.
Any idea?
Code: Select all
;Not working in WinXP:
ControlSend, %ExplControl%, {F5}, ahk_id %curId%
PostMessage, 0x111, 41504,, %ExplControl%, ahk_id %curId%
PostMessage, 0x111, 28931,, %ExplControl%, ahk_id %curId% ; ahk_class CabinetWClass
DllCall( "Shell32\SHChangeNotify", UInt,0x08000000, UInt,0, Int,0, Int,0 ) ; SHCNE_ASSOCCHANGED
PostMessage, 0x1A,,, %ExplControl%, ahk_id %curId% ; ahk_class Progman
Run RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
SendMessage, 0x1A,0, 10000,SysListView321, ahk_id %curId% ;ahk_class %ExplClass%
SendMessage, 0x0B, 0, 1,SysListView321, ahk_id %curId% ;ahk_class %ExplClass%