mrjoli021 Posted September 5, 2012 Share Posted September 5, 2012 I am looking for a way to open a text box on mouseclick. Link to comment Share on other sites More sharing options...
stormbreaker Posted September 5, 2012 Share Posted September 5, 2012 Check about _ispressed function in help file ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1 Link to comment Share on other sites More sharing options...
mrjoli021 Posted September 5, 2012 Author Share Posted September 5, 2012 I several mouse positions and based on them I would like to display something diffrent. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 5, 2012 Moderators Share Posted September 5, 2012 I several mouse positions and based on them I would like to display something diffrent.Hi, mrjoli021. I believe you would have to put forth considerable effort to provide us with less information Can you please explain in detail what you're trying to accomplish, and provide what you have thus far (even if it does not work). "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
mrjoli021 Posted September 5, 2012 Author Share Posted September 5, 2012 I want something like this. I have a map and need to make it as my wallpaper. When I click on certain cities, I would like to get a txt or msgbox to come up with more info on that city. if MouseClick ( "left" , 373, 430, 1 ) Then MsgBox(4096, "Test", "This is a test", 10) EndIf Link to comment Share on other sites More sharing options...
JohnOne Posted September 5, 2012 Share Posted September 5, 2012 This is something that is quite easy to accomplish. I suggest to try to solve it yourself, and try to break out of your usual routine and providing lousy information, and not even trying anything except modifying code handouts. You know it makes sense and will be better for you, when you login with your next project. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
mrjoli021 Posted September 6, 2012 Author Share Posted September 6, 2012 why is this shows up when I run the program, but when I click on position (373, 430) it does not show up if MouseClick ( "left" , 373, 430, 1 ) = 1 then ICG() endif Func ICG() ToolTip($account & @CRLF & $computer & @CRLF & $tvid & @CRLF & $ip,0, 0,"ICG Support Info:") Sleep(10000) ToolTip("") EndFunc Link to comment Share on other sites More sharing options...
JohnOne Posted September 6, 2012 Share Posted September 6, 2012 Because MouseClick Function Clicks the mouse at the coordinates you supply. MouseClick returns non zero on success, so your function is called. You should be looking at the functions _IsPressed() ;can detect a mouseclick if called in a loop MouseGetPos ; can return the position of the mouse at the time it is called. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Colyn1337 Posted September 6, 2012 Share Posted September 6, 2012 (edited) Seems to me like you're thinking along the lines of Visual Studio programming where you can define events. AutoIt is a bit different in handling events... #include <array.au3> #include <guiconstants.au3> GUICreate("test", 200, 200, -1, -1) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() $aMouse = MouseGetPos() ; Remembers current mouse position Select Case $msg = $GUI_EVENT_PRIMARYDOWN ConsoleWrite("Mouse Clicked at " & $aMouse[0] & "," & $aMouse[1] & @LF) Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd What I've done here is told autoit to report in the console window where the mouse position is when the mouse is pressed. You can change it and add IF/THEN statements to perform functions on the x,y of the mouse position at the time of a click. If this helps you, please post that it does. Thanks! EDIT: Had to add back the #includes as the forum stripped it out for some reason.... Also, I've read over some of the posts from others, and I must apologize for the way you've been spoken to. Not everyone in the tech world posesses soft skills..... Edited September 6, 2012 by Colyn1337 Link to comment Share on other sites More sharing options...
mrjoli021 Posted September 6, 2012 Author Share Posted September 6, 2012 I belive I have a solution. I will get the mouse poistion and add +- 5 to it put thoose numbers into an array 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