Drwoods Posted June 5, 2010 Share Posted June 5, 2010 I am tring to automate changing settings in a GUI application. However, when I put multiple send methods sequenced one after another some of them work and them it seems it just stops. I tried using one send call with multiple buttons in the arguments but it does the same thing. I also tried changing the delay time, still no luck. I am running the application on win7 if that makes a difference. I noticed there were topics pertaining to problems with vista/7. Please help me figure out how to get this working. I am new to AutoIt but not new to programming. Thanks Link to comment Share on other sites More sharing options...
DW1 Posted June 5, 2010 Share Posted June 5, 2010 Post the script and it will be easier to help. AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Drwoods Posted June 5, 2010 Author Share Posted June 5, 2010 I originally had it this way. Func changeSettings() Run("program.exe") WinWaitActive("Main Window") Send("!s") WinWaitActive("SETTINGS") Send("{DOWN}") Send("!u") Send("{DOWN 8}") Send("!e") Send("!o") WinClose("Main Window") I also tried it like this Func changeSettings() Run("program.exe") WinWaitActive("Main Window") Send("!s") WinWaitActive("SETTINGS") Send("{DOWN}!u{DOWN 8}!e!o") Both of witch never complete the last !e and !o. Thanks Link to comment Share on other sites More sharing options...
omikron48 Posted June 5, 2010 Share Posted June 5, 2010 Try lengthening the SendKeyDownDelay. Maybe the program isn't recognizing the sent keys properly because they're too fast. Put this at the start of your script: Opt("SendKeyDownDelay", 50) Link to comment Share on other sites More sharing options...
Drwoods Posted June 5, 2010 Author Share Posted June 5, 2010 I tried doing Opt("SendKeyDownDelay", 10) and it didn't make a difference. But i will try 50 to see what happens Link to comment Share on other sites More sharing options...
Drwoods Posted June 5, 2010 Author Share Posted June 5, 2010 It seems to be working just fine now. Thank you. Is the 50 in milliseconds or what unit does that represent? Link to comment Share on other sites More sharing options...
omikron48 Posted June 5, 2010 Share Posted June 5, 2010 It's in milliseconds. By default, AutoIt holds down a key press for 5ms. I got the 50ms when I tried making a turbo fire button for a vertical scrolling shooter I was playing a long time ago. 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