in reply to Reload Browser Tab on Windows
Otherwise, taking a look at the code from the first answer to the SO post you linked,
Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.AppActivate("Firefox") WshShell.SendKeys "{F5}" WshShell.AppActivate("TextPad")
I think that the CreateObject would be equivalent to the Win32::OLE->new('WScript.Shell'), and that the methods should translate across... but I haven't tried.
I'll try:
perl -MWin32::OLE -e "$obj = Win32::OLE->new('WScript.Shell') or die $ +!; $obj->AppActivate('Chrome') or die $!; $obj->SendKeys('{F5}');"
Yep, that refreshed the current page in Chrome for me.
Hopefully, that gives you enough to get started with.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reload Browser Tab on Windows
by pryrt (Abbot) on Dec 21, 2020 at 21:39 UTC | |
|
Re^2: Reload Browser Tab on Windows
by LanX (Saint) on Dec 21, 2020 at 21:44 UTC |