AutoHotkey Community

It is currently May 26th, 2012, 9:46 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: September 22nd, 2009, 9:03 pm 
Hello

Im very new at AutoHotKey, and at programming at all.

Im working on a very simpel "Clicking" script like:
Quote:
MouseClick, left, 238, 529
Sleep, 100
MouseClick, left, 222, 540
Sleep, 100
MouseClick, left, 868, 540
Sleep, 100

And so on.

And I want it so stop if something goes wrong. Like a window popping up. So it dosen't just click all over the place.

How can i do that? (mabye something like stopping the script if certain pixels changes color)

I hope you understand what im talking about, and that you are willing to help me.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 22nd, 2009, 9:42 pm 
Offline

Joined: December 24th, 2008, 3:25 am
Posts: 1401
Location: :noitacoL
There are dozens of ways to meet your request needs.

There is a specific way to tell if a pixle changes, yes. .. but it may not be your best option. (If the box that comes up, is the same color as the pixle for example, no error condition is met)

You can tell it to 'activate' a certain window, and only send the commands to THAT window.

You can tell the script to stop, if another window appears, outside of a preset list.

You can

Quote:
And I want it so stop if something goes wrong. Like a window popping up. So it dosen't just click all over the place


We need a little bit more information to better assist you.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 22nd, 2009, 9:54 pm 
If you're autoclicking around in a specific window, you could check for changes in the windows size, position, title, text, controls, check if it's still the active window, check if it still exists, check if any other windows were opened since the start of the script, check for changes in the other windows' sizes, positions, etc., check for new processes, etc. etc.
It's hard to suggest anything without knowing any specifics.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, JSLover, patgenn123, rbrtryn, virpara and 56 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group