axslinger Posted December 12, 2007 Share Posted December 12, 2007 (edited) I'm trying to get the following code to work. I just want to press the "OK" button, but it won't happen. I've use ControlSend as well as the following code. Ive also tried ControlClick but every time I use the Window Info tool, the control (the OK button) has a different control number.Run("spybotsd15he-beta1.exe") WinWaitActive("Open File - Security Warning") ControlClick("Open File - Security Warning", "run this file", "[ID:4423]") WinWaitActive("Select Setup Language", "&Select the language") ControlFocus("Select Setup Language", "Select the language", "") Send("{ENTER}")It just hangs at the screenshot I've included.thanks for your help. Edited December 12, 2007 by axslinger Link to comment Share on other sites More sharing options...
Fossil Rock Posted December 12, 2007 Share Posted December 12, 2007 I'm trying to get the following code to work. I just want to press the "OK" button, but it won't happen. I've use ControlSend as well as the following code. Ive also tried ControlClick but every time I use the Window Info tool, the control (the OK button) has a different control number. Run("spybotsd15he-beta1.exe") WinWaitActive("Open File - Security Warning") ControlClick("Open File - Security Warning", "run this file", "[iD:4423]") WinWaitActive("Select Setup Language", "&Select the language") ControlFocus("Select Setup Language", "Select the language", "") Send("{ENTER}") It just hangs at the screenshot I've included. thanks for your help.Probably because it's waiting on the highlighted line above to appear. Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
axslinger Posted December 12, 2007 Author Share Posted December 12, 2007 Probably because it's waiting on the highlighted line above to appear.I guess I should have pointed out, by then its already past that line. Its the first thing that appears after the run line.Brian Link to comment Share on other sites More sharing options...
DW1 Posted December 12, 2007 Share Posted December 12, 2007 Is the '&' here a mistake? WinWaitActive("Select Setup Language", "&Select the language")oÝ÷ Øè¶'v+wöÉè¶)í+(殶sd6öçG&öÄfö7W2gV÷Cµ6VÆV7B6WGWÆæwVvRgV÷C²ÂgV÷Cµ6VÆV7BFRÆæwVvRgV÷C²ÂgV÷C²gV÷C² AutoIt3 Online Help Link to comment Share on other sites More sharing options...
DW1 Posted December 12, 2007 Share Posted December 12, 2007 also, a focus is not the same as a click... was that intentional? AutoIt3 Online Help Link to comment Share on other sites More sharing options...
ksmith247 Posted December 12, 2007 Share Posted December 12, 2007 (edited) I've never had much luck using WinWaitActive in scripts such as this. Try using just WinWait if Danwilli's observations don't resolve your issue. Edit: Poor wording. Edited December 12, 2007 by ksmith247 Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size] Link to comment Share on other sites More sharing options...
axslinger Posted December 13, 2007 Author Share Posted December 13, 2007 That version of my code had been butchered from trying numerous things. This is the latest thing I've tried: Run("spybotsd15he-beta1.exe") WinWaitActive("Open File - Security Warning") ControlClick("Open File - Security Warning", "run this file", "[ID:4423]") WinWait("Select Setup Language","") Send("{ENTER}") It seems to me that should work but it just pauses with the icon in the tray. All I want to do is click "OK"...at this rate it'll be 2050 before I can make anything useful from AutoIT. (I do however appreciate everyones help!). Brian 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