DoubleMcLovin Posted December 11, 2009 Share Posted December 11, 2009 Hi everyone, it has been a few years since I have played with autoIT and I wanted to start with a simple script that will make a dialog box asking you to click in a certain area (in a different window) and upon click, it will record the location to a variable and then close the dialog box. I can't find a good tutorial on how to do this, however, so I thought it was worth a shot to ask for some help! Thanks in advance. Link to comment Share on other sites More sharing options...
Developers Jos Posted December 11, 2009 Developers Share Posted December 11, 2009 You mean you actually looked for information in the Helpfile and Forum to see if there was information available? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
DoubleMcLovin Posted December 11, 2009 Author Share Posted December 11, 2009 Yes that is absolutely what I am saying, and I also did a fair amount of searching through google. Link to comment Share on other sites More sharing options...
Richard Robertson Posted December 11, 2009 Share Posted December 11, 2009 I'm curious. What did you try searching for? Link to comment Share on other sites More sharing options...
DoubleMcLovin Posted December 12, 2009 Author Share Posted December 12, 2009 find mouse click, find mouse location, get mouse location, mouse location, get mouse position onclick. Things like that. Most everything pointed me towards the autoit spy (autoitinfo.exe) which is great, but does not accomplish what I need done. If I missed something obvious someone please point it out. Link to comment Share on other sites More sharing options...
Authenticity Posted December 12, 2009 Share Posted December 12, 2009 (edited) Yes, it's harder to find if you don't know the correct term. It's not impossible though. Here is a search for mouse hook.Edit: lol sorry. Edited December 12, 2009 by Authenticity Link to comment Share on other sites More sharing options...
DoubleMcLovin Posted December 12, 2009 Author Share Posted December 12, 2009 TY very much I knew there would be a way to do this but for the life of me I couldn't find anything in the list of functions @_@ Link to comment Share on other sites More sharing options...
DoubleMcLovin Posted December 12, 2009 Author Share Posted December 12, 2009 >_> after a lot of reading through those I got rather confused. Can someone help em out here? I just need like a tooltip to pop up on the mouse saying "click the tree" then save the tree's x,y coords in a var then say "the tree is at $loc[1] $loc[2]" Link to comment Share on other sites More sharing options...
Authenticity Posted December 12, 2009 Share Posted December 12, 2009 If you don't want to use hook. You can let the user press your GUI and without releasing the mouse button move the cursor to the tree and release the mouse button there. This way you'll receive a $WM_LBUTTONUP message, then use MouseGetPos or something. This approach is like the Finder Tool of AutoIt Window Info tool. Another way would be to use a hot-key. If you're insisting to perform it via a mouse click, I guess that your easy solution would be to use mouse hook. 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