Rater Posted February 18, 2008 Share Posted February 18, 2008 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 More sharing options...
SiteMaze Posted February 18, 2008 Share Posted February 18, 2008 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 Arsenal Football Fan Club in Singapore Link to comment Share on other sites More sharing options...
Rater Posted February 18, 2008 Author Share Posted February 18, 2008 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.htmOK, so the control ID for the Yes button is 6. I tried the following code, no dice.===================================; Script Start - Add your code below hereMsgBox(900, "Greeting", "Hello World!")ControlSend("Greeting", "Hello World!", 6, "Yes")=================================== Link to comment Share on other sites More sharing options...
BrettF Posted February 18, 2008 Share Posted February 18, 2008 ControlSend ("Greeting", "Hello World", 6, "{ENTER}" Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Rater Posted February 18, 2008 Author Share Posted February 18, 2008 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 More sharing options...
bogQ Posted February 18, 2008 Share Posted February 18, 2008 (edited) 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 February 18, 2008 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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 More sharing options...
Rater Posted February 18, 2008 Author Share Posted February 18, 2008 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 More sharing options...
bogQ Posted February 18, 2008 Share Posted February 18, 2008 (edited) Awesome thanks. Any idea why mouseclicks aren't working ??the same reason porbably ^^ i edited my last post Edited February 18, 2008 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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 More sharing options...
Rater Posted February 18, 2008 Author Share Posted February 18, 2008 the same reason porbably ^^ i edited my last postbogQ:That's gotta be it. Thanks man!! TY also everyone who replied!! Link to comment Share on other sites More sharing options...
BrettF Posted February 18, 2008 Share Posted February 18, 2008 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 forumI do believe that is mainly only true for AutoIt and it's message boxes. It is possible to send messages to the window. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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