Jump to content

Question


 Share

Recommended Posts

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

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 by Parker
Link to comment
Share on other sites

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

ControlClick( "Game.exe", "Yes", SelectString Yes )

I got an error could someone fix this

few 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 by cameronsdad
Link to comment
Share on other sites

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

Sure 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

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

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

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 by Garanator
Link to comment
Share on other sites

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

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

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

yes. make sure you have the msgbox as the active window...

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...