Trial4life
New member
- Local time
- 7:29 AM
- Messages
- 5
Hi,
I'm not an expert in Windows scripts and programming, but Googling around I've found this code to refresh the desktop/active folder:
The problem is that the desktop (or the folder) must be the active window; for exaple, if I launch the command from a shortcut on the taskbar, the desktop won't be active and it won't refresh (unless I click on the desktop in less than one second); I could increase the wscript.sleep to have more time to click on the desktop, but it won't be comfortable then.
Is there another smarter way to refresh the desktop?
Thanks in advice.
I'm not an expert in Windows scripts and programming, but Googling around I've found this code to refresh the desktop/active folder:
Code:
set oWSH = wscript.CreateObject("Wscript.Shell")
Hme = "Home - Microsoft Internet Explorer"
oWSH.appActivate(Hme)
wscript.sleep 1000
oWSH.appActivate(hme)
oWSH.SendKeys "{F5}"
The problem is that the desktop (or the folder) must be the active window; for exaple, if I launch the command from a shortcut on the taskbar, the desktop won't be active and it won't refresh (unless I click on the desktop in less than one second); I could increase the wscript.sleep to have more time to click on the desktop, but it won't be comfortable then.
Is there another smarter way to refresh the desktop?
Thanks in advice.
My Computer
- Computer type
- PC/Desktop
- OS
- Windows 7