Hello everyone,

I am writing a small script that will open my bandwidth usage page through Firefox and an Excel spreadsheet.

Here is the code:
Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run "C:\Users\J\Desktop\Firefox.lnk"

WScript.Sleep 300

WshShell.SendKeys "http://www.cogeco.ca/cable/on/en/mycogeco/home.html"

WshShell.SendKeys "{ENTER}"

WshShell.Run "F:\Common\JiL"

WshShell.SendKeys "band"

WshShell.SendKeys "{ENTER}"

WScript.Sleep 1500

WshShell.AppActivate "Cogeco - Mozilla Firefox"

WScript.Quit [exitcode]
The problem is that the AppActivate command at the end is not fousing on that window. I can clearly see the window's name: Cogeco - Mozilla Firefox

Help, suggestions or alternatives are welcome.

Thanks a lot,
What about using scriptmonkey or something like that to automate firefox (or something else, there must be solid ways of automating firefox), then have it save this stuff in a csv, and use WSH to import the csv into Excel?
There are also PHP libraries to read and generate XLS files.
Bottom line is, I was trying to say - try another way that gives you more control.
I use PHP for everything, but that's just me. I even used PHP once to launch IE and bind to it through COM, and had PHP handlers for COM events fired by IE.
Thanks for the advice rolf, but I trying to learn VBS and use it in my "everyday" tasks. So far so good except for this AppActivate problem.

Any alternative commands ?
No one with an alternative ?