Help finding certain image rec functionality

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
ari
Junior Coder
Posts: 23
Joined: Tue Jul 15, 2014 4:12 pm

Help finding certain image rec functionality

Post by ari » Mon Jul 21, 2014 4:41 pm

I am using MS14 to interact with software exclusively via Citrix, so many windows hook function do not work. Is there a function that pauses a macro while the screen is being interacted with (typing or moving cursor) and then resume when the screen is left alone for a defined time?

Thanks!

ari
Junior Coder
Posts: 23
Joined: Tue Jul 15, 2014 4:12 pm

Re: Help finding certain image rec functionality

Post by ari » Wed Jul 23, 2014 8:28 pm

WaitRecChanged does not seem to do the trick for me. Any reason this would not work over citrix? Does moving the mouse count as a change in the rectangle image that would trigger this command? If my screen is 800x600, would 0,0,800,600 do the whole screen? Thanks for your help!

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Help finding certain image rec functionality

Post by Marcus Tettmar » Wed Jul 23, 2014 9:29 pm

WaitRectChanged does not see the mouse cursor.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

ari
Junior Coder
Posts: 23
Joined: Tue Jul 15, 2014 4:12 pm

Re: Help finding certain image rec functionality

Post by ari » Thu Jul 24, 2014 2:21 pm

Ok thanks; how would I go about pausing a script when there was some kind of keyboard/mouse activity? then resuming when idle

User avatar
Meryl
Staff
Posts: 124
Joined: Wed Sep 19, 2012 1:53 pm
Location: Texas
Contact:

Re: Help finding certain image rec functionality

Post by Meryl » Mon Jul 28, 2014 2:10 pm

Is this along the lines of what you're looking for?
http://www.mjtnet.com/forum/viewtopic.p ... 220&p=9085

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Help finding certain image rec functionality

Post by Marcus Tettmar » Mon Jul 28, 2014 7:38 pm

All I can think of is that you could write a loop that checks the cursor position. If the cursor has not moved after a specified delay you could assume the session is idle.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts