diikee Posted May 15, 2008 Share Posted May 15, 2008 #include <Date.au3>#include <Array.au3>#include <IE.au3>Opt("WinWaitDelay", 200)Opt("WinTitleMatchMode", 2)---->partially match the titleOpt("WinDetectHiddenText", 1)Opt("MouseCoordMode", 0)$ip = InputBox("IQTEST SUITE", "Enter IP:", "");$c = InputBox("Iterations", "No. of iterations<0-5>: ","")$oIE = _IECreate($ip, 0)Sleep(2000)_IELinkClickByText($oIE, "settings")----->works up to this pointSleep(1000)WinWait("Connect to "& $ip,"")-----> pops upIf Not WinActive("Connect to "& $ip,"") Then WinActivate("Connect to "& $ip,"")WinWaitActive("Connect to "& $ip,"")ControlClick("Connect to "& $ip,"The server","[CLASS:Button; TEXT:OK; Instance:2;]")----> Never gets executedsleep(1000)_IELinkClickByText($oIE, "live") Link to comment Share on other sites More sharing options...
sandin Posted May 15, 2008 Share Posted May 15, 2008 -have you tried the script without WinWait/WinWaitActive commands? -are you sure u got the right name of the pop up? if not, use AutoIt Window Info -try adding: Opt("TrayIconDebug", 1) at the top of your script, and you can see where your script halts by moving your mouse over tray icon Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
diikee Posted May 15, 2008 Author Share Posted May 15, 2008 Yes, I used the Info Tool and matching any name on the title with the WinTitleMatchMode=2 Mouse instance is 2, Link to comment Share on other sites More sharing options...
diikee Posted May 15, 2008 Author Share Posted May 15, 2008 If I use the Script recorder tool, then the script works fine.MouseMove(239,177)MouseClick("left")----->>>this is the same as clicking on (linkbytext, "settings");MouseUp("left")WinWait("Connect to "& $ip,"")If Not WinActive("Connect to "& $ip,"") Then WinActivate("Connect to "& $ip,"")WinWaitActive("Connect to "& $ip,"")MouseMove(190,330)MouseDown("left")MouseUp("left") Link to comment Share on other sites More sharing options...
diikee Posted May 15, 2008 Author Share Posted May 15, 2008 this really puzzles me#include <Date.au3>#include <Array.au3>#include <IE.au3>Opt("TrayIconDebug", 1)Opt("WinWaitDelay", 200)Opt("WinTitleMatchMode", 2)Opt("WinDetectHiddenText", 1)Opt("MouseCoordMode", 0)$ip = InputBox("IQTEST SUITE", "Enter IP:", "")$oIE = _IECreate($ip, 0)Sleep(1000)MouseMove(239,177)MouseClick("left")WinWait("Connect to "& $ip,"")If Not WinActive("Connect to "& $ip,"") Then WinActivate("Connect to "& $ip,"")WinWaitActive("Connect to "& $ip,"")MouseMove(834,736)------->>>>This works MouseDown("left")MouseUp("left")_IELinkClickByText($oIE, "settings")WinWait("Connect to "& $ip,"")If Not WinActive("Connect to "& $ip,"") Then WinActivate("Connect to "& $ip,"")WinWaitActive("Connect to "& $ip,"")MouseMove(834,736)------->>>>This doesn't work.....MouseDown("left")MouseUp("left") Link to comment Share on other sites More sharing options...
sandin Posted May 15, 2008 Share Posted May 15, 2008 heh, sry but I can't see the page you're looking at, therefore I can not see "settings" link and test it myself to see where it halts... Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
diikee Posted May 15, 2008 Author Share Posted May 15, 2008 it's an intraweb so, how do I post it?? Link to comment Share on other sites More sharing options...
Neo Posted May 16, 2008 Share Posted May 16, 2008 (edited) You can try hosting it somewhere and providing the link but I guess the issue rises from trying to perform the _IELinkClickByText() too fast, before the settings has even loaded on the page. Try using _IELoadWait() like this: MouseMove(834,736)------->>>>This works MouseDown("left") MouseUp("left") _IELoadWait($oIE) ;Wait until page is loaded _IELinkClickByText($oIE, "settings") I would also recommend that you don't use mouse coordinates as what works now may not work tomorrow because of window size, resolution, etc. _IE functions made by Master Dale Hohm can help you with all this more accurately if you need them. Edited May 16, 2008 by Neo Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now