Jump to content

Noob Mouseclick Issue


Rater
 Share

Recommended Posts

So I can't get AutoIt to execute Mouseclicks.

Uber Noob, but I've searched and read quite a bit about this. Below are my 2 best attempts. Neither one is working. The "MsgBox" creates a message box with 2 buttons: Yes and No. I'm simply trying to get the mouse to click "Yes" to close the message box. I've triple-checked the coordinates, and they are correct. Am I retarded or something? TY for your help!!

===================================(1)

; Script Start - Add your code below here

Opt("MouseCoordMode", 0)

MsgBox(900, "Greeting", "Hello World!")

MouseClick ("left", 50, 100)

===================================(2)

; Script Start - Add your code below here

MsgBox(900, "Greeting", "Hello World!")

Send("!y")

Link to comment
Share on other sites

Or you could try the reliable way of sending keys directly to the control, whether the window is active or not.

In this case, an enter key or a Alt+O key.

http://www.autoitscript.com/autoit3/docs/f...ControlSend.htm

OK, so the control ID for the Yes button is 6. I tried the following code, no dice.

===================================

; Script Start - Add your code below here

MsgBox(900, "Greeting", "Hello World!")

ControlSend("Greeting", "Hello World!", 6, "Yes")

===================================

Link to comment
Share on other sites

ControlSend ("Greeting", "Hello World", 6, "{ENTER}"

This is the exact code I used:

ControlSend("Greeting", "Hello World!", 6, "{ENTER}")oÝ÷ ØÚÇßÙ¬µªíx-£
'uêâ|hm«ÞjènW¦Â+a)¨ºÇ®+Þ®ì¢g­)à½êæÊj.±ç%É,ì(®L"¶ayú%".¶-6^¥§SºÚ+©¡×ºÚ"µÍÂ[ ][ÝÛÝY^I][ÝÊBÚ[ØZ]XÝ]J  ][ÝÕ[]YHÝY   ][ÝÊBÙ[
    ][ÝÒIÌÎNÛHXÚÈ[YË]Ú ][ÝÊBÛY

BÚ[ÛÜÙJ ][ÝÕ[]YHÝY   ][ÝÊBÚ[ØZ]XÝ]J ][ÝÓÝY   ][ÝË  ][ÝÑÈ[ÝHØ[ÈØ]HHÚ[ÙÏÉ][ÝÊBÙ[
    ][ÝÉÌÌÎÛ][ÝÊ

It's gotta be something really stupid, but I have no idea what.

Link to comment
Share on other sites

It's gotta be something really stupid, but I have no idea what.

you cant use send or controlsend option on msgbox, becose it pause the script until something hapens on that box, so your command "!n" will not work on that tupe of window, itl work after the msgbox is no longer there.

Edit:

and you cant use the mouseclick on msgbox becose of the same reasons, you beter try to make your own msgbox with gui option, or try search button on the top of the forum

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

you cant use send or controlsend option on msgbox, becose it pause the script until something hapens on that box, so your command "!n" will not work on that tupe of window, itl work agter the msgbox is no longer there.

Awesome thanks. Any idea why mouseclicks aren't working ??

Link to comment
Share on other sites

Awesome thanks. Any idea why mouseclicks aren't working ??

the same reason porbably ^^ i edited my last post

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

you cant use send or controlsend option on msgbox, becose it pause the script until something hapens on that box, so your command "!n" will not work on that tupe of window, itl work after the msgbox is no longer there.

Edit:

and you cant use the mouseclick on msgbox becose of the same reasons, you beter try to make your own msgbox with gui option, or try search button on the top of the forum

I do believe that is mainly only true for AutoIt and it's message boxes. It is possible to send messages to the 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...