My scripts open browser windows, download files, open them in excel, saves them as ____-, and when everything works correctly, it closes all the windows as it goes.
On occasion, something goes wrong and one of the windows will remain open. While I know I can create scripts with specific steps for each window name that might be open, I'm hoping to find something that "cleans up" with a wider brush stroke.
Is there a "select any excel/chrome window that is open by any name" or similar function?
My desire is to close all Excel, Chrome, and eventually a few windows from within our accounting system.
Thanks
The Perpetual Newb
Creating a "cleanup script"
Moderators: Dorian (MJT support), JRL, Phil Pendlebury
Re: Creating a "cleanup script"
ok... so GetWindowList can generate a list of open windows....
I guess I'll attempt to loop through the list and clean up from there (unless any better suggestions come though in the meantime)
I guess I'll attempt to loop through the list and clean up from there (unless any better suggestions come though in the meantime)
Re: Creating a "cleanup script"
Might be easier to use Killprocess> to kill all Chrome.exe and Excel.exe processes. Or, I like to use DOS taskkill. Taskkill kills all of a given process name in one swoop.
Code: Select all
Let>RP_Wait=1
Let>RP_Windowmode=0
RunProcess>cmd /c taskkill /im "excel.exe" /f
RunProcess>cmd /c taskkill /im "chrome.exe" /f
Re: Creating a "cleanup script"
So clean. So nice. So appreciated. Thank you!!!!