Net Posted November 20, 2007 Share Posted November 20, 2007 I'm very new to coding in general and was wondering if anyone could help me. I have written this (don't laugh) to help me with a project, which it currently does fine. Anyways, I need help understanding how to send a command to an alt-tabbed or hidden window. From the little I understand I would use a ControlSend command? CODE#NoTrayIcon AutoItWinSetTitle ("Firefox") HotKeySet("{ESC}", "esc") HotKeySet("{F4}", "mfe") While 1 Sleep ("500") WEnd Func mfe() $o = 1 Do $sec = Random ("7000", "10000", "1") Sleep ($sec) Send ("5") $o = $o + 1 Until $o = 100 EndFunc Func esc() WinKill ("Firefox") EndFunc Link to comment Share on other sites More sharing options...
AlmarM Posted November 20, 2007 Share Posted November 20, 2007 1st of all. Does the script reads: $sec = Random ("7000", "10000", "1")oÝ÷ Øhºméz»Ùíçj«¨µ*ºÚ"µÍÌÍÜÙXÈH[ÛJ ÌLL Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 20, 2007 Share Posted November 20, 2007 Yes, ControlSend(). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Net Posted November 20, 2007 Author Share Posted November 20, 2007 (edited) ControlSend ("omgsekretzlawl", "", "", "5") Is what I was using to replace Send(). I used "AutoIt Window Info" to figure out the rest of the code for ControlSend() but it only has a title. Does removing the quotations do anything such as minimally optimize the code or something? Edited November 20, 2007 by Net Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 20, 2007 Share Posted November 20, 2007 Where required the the built-in AutoIt functions do a Number() or String() conversion to match variable types on parameters. $sec = Random("7000", "10000", "1") ConsoleWrite("Debug: $sec = " & $sec & @LF) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 20, 2007 Share Posted November 20, 2007 ControlSend ("omgsekretzlawl", "", "", "5") Is what I was using to replace Send(). I used "AutoIt Window Info" to figure out the rest of the code for ControlSend() but it only has a title. Does removing the quotations do anything such as minimally optimize the code or something? That should work fine. What happens when you try it? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Net Posted November 20, 2007 Author Share Posted November 20, 2007 It's supposed to press a hot key in the game but it doesn't so it just idles. (I want to thank you a lot in advance for at least taking the time to reply ) 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