How to release following

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
maxim_2008
Newbie
Posts: 2
Joined: Tue Jan 08, 2008 4:01 pm

How to release following

Post by maxim_2008 » Tue Jan 08, 2008 4:29 pm

I have window .
This window contains the table with three columns.

A problem it is necessary to fill columns without mouse use.

I can fill the first column having entered in it by means of TAB.

Enter on the second column I can by means of TAB.

But in the second column mouse participation as it is necessary to make doubleclick is necessary.

But I cannot make it as the mouse is not present.

The command doubleclick does not work as the cursor of the mouse is not present.

There is only a text cursor. As it is possible to realise doubleclick without mouse participation. How it to make?[/img]

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

Post by Marcus Tettmar » Tue Jan 08, 2008 4:48 pm

Can you use MouseMoveRel? Or FindImagePos to find the column and move the mouse to the found position?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Jan 08, 2008 5:04 pm

Curious about what program this table is showing up in....?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

maxim_2008
Newbie
Posts: 2
Joined: Tue Jan 08, 2008 4:01 pm

Post by maxim_2008 » Wed Jan 09, 2008 11:29 am

mtettmar wrote:Can you use MouseMoveRel?
Yes , I can . But the window time to time can be resized.

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

Post by Marcus Tettmar » Wed Jan 09, 2008 3:04 pm

MouseMoveRel is relative. So the window resizing shouldn't matter so long as the object stays in the same position relative to the upper left corner, which is usually the case. If not, you should still be able to find the position of it using FindImagePos.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

charleyhansen
Newbie
Posts: 2
Joined: Wed Nov 26, 2008 1:56 am

FindImagePos and using MouseMoveRel

Post by charleyhansen » Sat Apr 25, 2009 3:26 am

Here is my understanding of the FindImagePos function. If I use this code for example I see that when it finds the needle image it clicks on the center of the button. I realize I can make it click anywhere on the button, but can I make it click outside of the image, say, to the right of the image - outside of the image? How would I modify this script below if I wanted to click directly to the right of this button? Thanks for all your help!

FindImagePos>C:\Users\Family PC\Documents\Macro Scheduler\requireddata.bmp,SCREEN,0,1,X,Y,NumFound
If>NumFound>0
MouseMove>X_0,Y_0
LClick

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

Post by Marcus Tettmar » Sat Apr 25, 2009 7:58 am

Assuming you have FindImagePos return the centre position of the needle, then just add half the width of the needle plus a bit to the returned X position.

You can easily determine the length of the needle image by looking at it's properties in Windows Explorer.

So, for example, if, for arguments sake, requireddata.bmp is 20 pixels wide, we could do:

Code: Select all

FindImagePos>C:\Users\Family PC\Documents\Macro Scheduler\requireddata.bmp,SCREEN,0,1,X,Y,NumFound 
If>NumFound>0 
  MouseMove>{%X_0%+12},Y_0 
  LClick
Endif
Which would set the position to 2 pixels right of the object.
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
cron
Sign up to our newsletter for free automation tips, tricks & discounts