Search code examples
autoit

AutoIt opening and closing link with two browsers


i am trying to make a script that will open a a link in browser and click few positions.

I am new to AutoIt so please don't judge me, just try to help.

So far I've got this as a test and i have no idea how to specify a browser. I want to open one link in Opera and another in Chrome

$sUrl='http://localhost/userpanel'
ShellExecute($sUrl)
$hwnd=WinActivate("UCP Receive Bonus")
WinWaitActive($hwnd,'','5')
Sleep(5000)
MouseClick("left", 1410,205, 1, 5)

Solution

  • Depends on your system-configuration, but normally this should work

    ShellExecute('safari.exe', 'www.google.com')
    ShellExecute('firefox.exe', 'www.google.com')
    ShellExecute('chrome.exe', 'www.google.com')