Cyclone Posted January 9, 2007 Posted January 9, 2007 (edited) I'm a first time user, and I've really been impressed with this software. I've been digging through the examples and documents have have a script up and running in just few hours.With that said, I'm looking for a better way to get my script working.I've written a script to automatically run a speed test to my IPS's myspeed server. My script launches IE and it once the site is up, I use MouseClick to press the "Start the Test" button, and then a few more clicks to capture the results.The Active Window Info tells me that the button that I'm MouseClick ing on is ControlID 1 ClassNameNN: Button1 Text Click to Start MySpeed.How can I get AutoIT to directly "press" this button instead of using mouse click. If my IE window ever opens in a different location than it is now, the script would fail.Since my IE's position is vital to many of the button presses that follow, is there a way to open IE in the same location with the dimensions everytime? If I can't open the IE window into the same position, are there AutoIE commands that I can use to resize and reposition the window at the beginning of my script? Never mind, I found the WinMove command. :"> Thank you for your time.Don. Edited January 9, 2007 by Cyclone
Outshynd Posted January 10, 2007 Posted January 10, 2007 A better way to do it would be ControlClick. Check the helpfile or post back if you have problems.
Cyclone Posted January 10, 2007 Author Posted January 10, 2007 ControlClick looks like the answer, but its not activating. Here is the portion of the code. ; Click on Start Speed test button ControlClick("MySpeed Broadband Speed Test - Microsoft Internet Explorer","Click to start MySpeed",1,"left",2) ;MouseClick("main",500,330,2,10) sleep(20000) ; The Title and the Text are cut'n paste from the Active Window Info. So I would think they are matched up. If I uncomment the MouseClick line below, then that will work.
Outshynd Posted January 10, 2007 Posted January 10, 2007 ; Click on Start Speed test button ControlClick("MySpeed Broadband Speed Test - Microsoft Internet Explorer", "", 1, "left", 2) sleep(20000) Try this?
Cyclone Posted January 10, 2007 Author Posted January 10, 2007 It didn't work. This is a java app if that has anything to do with it. I had tried it with the "text" portion set to "". But I cut and pasted your line in and the behavior was still the same. Thanks for the help though.
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