Screen Capture with Mouse Cursor

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Darden4
Newbie
Posts: 4
Joined: Fri Oct 19, 2007 10:47 am

Screen Capture with Mouse Cursor

Post by Darden4 » Fri Oct 19, 2007 10:57 am

is there a way to take a screen shot with mouse cursor included? I have used the search button but the only thread i have found is sooo old (2005). Otherwise, waitcursorchange can recognise animated cursor? Cause i don't want WCC triggers after mouse has changed frame.

Ty for help

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

Post by Marcus Tettmar » Fri Oct 19, 2007 11:36 am

No, 'fraid not. But what you could do is store the mouse position at the same time using GetCursorPos. In theory you could then edit the captured image to show where the mouse was.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Darden4
Newbie
Posts: 4
Joined: Fri Oct 19, 2007 10:47 am

Post by Darden4 » Fri Oct 19, 2007 11:54 am

i don't need to know the mouse position, i give it, i need to know if it's changed there. I mean there r positions where mouse cursor changes color, but the positions aren't always the same, so i scan the screen moving mouse cursor till it changes. But i can't use the wcc cause this cursor is animated and that functions doesn't work well with it, and i can't use screencapture cause it doesn't capture the cursor...so what could i do?!?! :(

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Oct 19, 2007 9:34 pm

If you can install IrFanView on your computer you can capture a screen image that includes the cursor.

After install open IrFanView and go to the Options pulldown menu, select Capture Screenshot from the menu. Once there make sure the Include Cursor checkbox is checked. Save and exit IrFanView.

Now you can include lines similar to the following in your Macro Scheduler script.

Code: Select all

Let>RP_WAIT=1
Run>C:\Program Files\IrfanView\i_view32.exe  /capture=0 /convert=%TEMP_DIR%ScreenCap.jpg  
/Capture= values are 0 for entire screen, 1 for the foreground window and 2 for the client area of the foreground window.

Darden4
Newbie
Posts: 4
Joined: Fri Oct 19, 2007 10:47 am

Post by Darden4 » Sat Oct 20, 2007 6:51 am

nice ty, is it possible to capture an area from macro scheduler? I mean something like

Code: Select all

 
Let>RP_WAIT=1 
Run>C:\Program Files\IrfanView\i_view32.exe /capture=[code of area capture] [X1,Y1,X2,Y2] /convert=%TEMP_DIR%ScreenCap.jpg 
EDIT:doh the site is down :(

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Sat Oct 20, 2007 2:44 pm

Sure:

Code: Select all

Let>RP_WAIT=1
Let>xstart=100
Let>ystart=40
Let>wide=200
Let>high=100
Run>C:\IrfanView\i_view32.exe  /capture=0 /crop=(%xstart%,%start%,%wide%,%high%)  /convert=c:\test\ScreenCap.gif  
Note that you can save the capture as a different file type by changing the extension of the /convert filename. MacroScheduler usually works with .bmp's.

Darden4
Newbie
Posts: 4
Joined: Fri Oct 19, 2007 10:47 am

Post by Darden4 » Sun Oct 21, 2007 10:45 am

ty all

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