Garanator Posted December 16, 2005 Share Posted December 16, 2005 Everytime I run this program a msg box appears with the buttons yes no and cancel. Is it possible to make something that once the box appears it automatically hits yes instantly so that you don't even have to see the box? The msg box isn't from an autoit script Link to comment Share on other sites More sharing options...
Parker Posted December 16, 2005 Share Posted December 16, 2005 (edited) Everytime I run this program a msg box appears with the buttons yes no and cancel. Is it possible to make something that once the box appears it automatically hits yes instantly so that you don't even have to see the box? The msg box isn't from an autoit script I'd say the easiest thing to do is make a script that you run instead of the application. Basic code would look like this: Run("application.exe") WinWaitActive("Annoying Popup's Title Text") SEND("{ENTER}") EXIT It ought to work provided "Yes" is the highlighted button when the popup comes up. Edited December 16, 2005 by Parker Link to comment Share on other sites More sharing options...
JSThePatriot Posted December 16, 2005 Share Posted December 16, 2005 I would use the AutoIt Window Info tool to determine the ControlID and send a ControlClick(). Just my thoughts. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Garanator Posted December 16, 2005 Author Share Posted December 16, 2005 Would a control click move the mouse because if it did that then it wouldn't exactly be fast Link to comment Share on other sites More sharing options...
seandisanti Posted December 16, 2005 Share Posted December 16, 2005 Would a control click move the mouse because if it did that then it wouldn't exactly be fastno it wouldn't, but even with a mouseclick, if you set the speed to 0, it would exactly be fast.... Link to comment Share on other sites More sharing options...
Garanator Posted December 16, 2005 Author Share Posted December 16, 2005 (edited) Would control click find where the msg box yes is no matter where the msg box is on the screen? Edited December 16, 2005 by Garanator Link to comment Share on other sites More sharing options...
seandisanti Posted December 16, 2005 Share Posted December 16, 2005 (edited) Would control click find where the msg box yes is no matter where the msg box is on the screen?yes**edit*** even if the window is invisible/minimized Edited December 16, 2005 by cameronsdad Link to comment Share on other sites More sharing options...
Garanator Posted December 16, 2005 Author Share Posted December 16, 2005 ControlClick( "Game.exe", "Yes", SelectString Yes ) I got an error could someone fix this Link to comment Share on other sites More sharing options...
seandisanti Posted December 16, 2005 Share Posted December 16, 2005 (edited) ControlClick( "Game.exe", "Yes", SelectString Yes )I got an error could someone fix thisfew issues in that line...1) "Yes" is the text on the control, but you have it in the spot for window text. change that to ""2) after that paramter, you should have the numeric control id of the control you want to click as per the autoit window info tool. Not sure where you got what you have there, but it's not surrounded in quotes like a string, doesn't begin with a @ like a macro, or have parentheses like you're doing a function call; so just get rid of it completely and use the number.***edit*** and is "Game.exe" really the title displayed on the window you're trying to click on? if not, this is #3 to change Edited December 16, 2005 by cameronsdad Link to comment Share on other sites More sharing options...
Garanator Posted December 16, 2005 Author Share Posted December 16, 2005 (edited) wow english please whatever I am doing is completely wrong can I have an example that would make it so much easier I'm noobie Edit- Game.exe is the title of the msg box Edited December 16, 2005 by Garanator Link to comment Share on other sites More sharing options...
seandisanti Posted December 16, 2005 Share Posted December 16, 2005 wow english please whatever I am doing is completely wrong can I have an example that would make it so much easierI'm noobieEdit- Game.exe is the title of the msg boxSure thing, open your helpfile, click index, then start typing "controlclick" by the time you get to R, you'll be able to press enter and see an example on the right hand side of your screen Link to comment Share on other sites More sharing options...
Garanator Posted December 16, 2005 Author Share Posted December 16, 2005 ControlClick ( "title", "text", controlID [, button] [, clicks]] ) ControlClick("Untitled -", "", "MDIClient1") I know i've had this up for awhile I just don't know what I did wrong I want it to click the yes in the msg box not click the tab on the bottom of the screen Link to comment Share on other sites More sharing options...
seandisanti Posted December 16, 2005 Share Posted December 16, 2005 ControlClick ( "title", "text", controlID [, button] [, clicks]] ) ControlClick("Untitled -", "", "MDIClient1") I know i've had this up for awhile I just don't know what I did wrong I want it to click the yes in the msg box not click the tab on the bottom of the screen Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. button [optional] The button to click, "left", "right" or "middle". Default is the left button. clicks optional] The number of times to click the mouse. Default is 1. that's the important part above. the title you've alreayd identified to be "game.exe" (check your capitalizations) the text doesn't matter unless you have more than one window with the same title, so you can put "" (assuming you don't have another game.exe window) the control id can be retrieved using the autoit window info tool left click is assumed, so you don't have to designate a button one click is all that's necessary, and that's the default, so you don't need to supply that argument either. Link to comment Share on other sites More sharing options...
Garanator Posted December 16, 2005 Author Share Posted December 16, 2005 (edited) the control id is my problem i looked for the 'info' and i found a list of functions but i don't know where the control id can be retrieved from using the autoit window info tool... I'm a noobie so don't mind my stupidity tell me what to type in the help box to get straight to the control id list Edited December 16, 2005 by Garanator Link to comment Share on other sites More sharing options...
JSThePatriot Posted December 16, 2005 Share Posted December 16, 2005 Do you even know what the AutoIt Window Info tool is? If not then goto Start>All Programs>AutoItv3>Window Info Tool Then open the game.exe box you are talking about. Then move your mouse over the control. Press the buttons that it says to press to get the info tool to pause. Then get rid of the msg box. All the information you will need will be frozen in that box. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Valuater Posted December 16, 2005 Share Posted December 16, 2005 this is what it looks like the Control ID is "15" and the Class Name is "Edit1" 8) Link to comment Share on other sites More sharing options...
JSThePatriot Posted December 16, 2005 Share Posted December 16, 2005 this is what it looks like the Control ID is "15" and the Class Name is "Edit1" 8) @Garanator Make sure you dont use Control ID 15 or Edit1 unless that is what the Info tool displays for you. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
seandisanti Posted December 16, 2005 Share Posted December 16, 2005 Do you even know what the AutoIt Window Info tool is? If not then goto Start>All Programs>AutoItv3>Window Info ToolThen open the game.exe box you are talking about. Then move your mouse over the control. Press the buttons that it says to press to get the info tool to pause. Then get rid of the msg box.All the information you will need will be frozen in that box.JSyes. make sure you have the msgbox as the active window... Link to comment Share on other sites More sharing options...
Valuater Posted December 16, 2005 Share Posted December 16, 2005 make sure you "Press CTRL-ALT-F to pause the display" when you are on the correct location 8) Link to comment Share on other sites More sharing options...
Garanator Posted December 16, 2005 Author Share Posted December 16, 2005 Ok thanks I finally got it sorry about that 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