Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
armsys
- Automation Wizard
- Posts: 1108
- Joined: Wed Dec 04, 2002 10:28 am
- Location: Hong Kong
Post
by armsys » Thu Oct 15, 2015 11:32 pm
According to the Bible:
ScreenCapture>X1,Y1,X2,Y2,Filename
Captures a portion of the screen to a .BMP (bitmap) or .JPG (jpeg) file and (by default) to the clipboard.
In actuality, the clipboard is been emptied, not filled up with image data.
Please verify. Thank you.
-
armsys
- Automation Wizard
- Posts: 1108
- Joined: Wed Dec 04, 2002 10:28 am
- Location: Hong Kong
Post
by armsys » Sat Oct 17, 2015 6:52 am
The following code should prove that the ScreenCapture doesn't save the captured image to the clipboard as defined in the manual.
Code: Select all
Let>SCREENCAP_CLIPBOARD=1
Let>ScreenCapture=
// Capture the entire screen
GetScreenRes>Width,Height
ScreenCapture>0,0,Width,Height,C:\Windows\Temp\Test.bmp
GetClipBoard>ScreenCapture
Length>ScreenCapture,Len
MDL>ScreenCapture
MDL>Len
-
hagchr
- Automation Wizard
- Posts: 331
- Joined: Mon Jul 05, 2010 7:53 am
- Location: Stockholm, Sweden
Post
by hagchr » Sat Oct 17, 2015 8:02 am
Hi, If I use your code and then directly do a ctrl-v in eg OneNote or Word it gets pasted correctly so the picture seems to be in the clipboard. Could it be that GetClipBoard> only can get plain text?
-
armsys
- Automation Wizard
- Posts: 1108
- Joined: Wed Dec 04, 2002 10:28 am
- Location: Hong Kong
Post
by armsys » Sat Oct 17, 2015 8:30 am
hagchr wrote:Hi, If I use your code and then directly do a ctrl-v in eg OneNote or Word it gets pasted correctly so the picture seems to be in the clipboard. Could it be that GetClipBoard> only can get plain text?
I can confirm your observation. That's, the image stored in the clipboard generated by SceenCapture can be pasted to Word.
You raise a critically important question--Could it be that GetClipBoard> only can get plain text?
In other words, likely both WriteLn and GetClipboard can't handle binary data.
Hope Marcus will be kind enough to clarify the confusion.
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Mon Oct 19, 2015 1:48 pm
GetClipboard and PutClipboard are for text.
-
armsys
- Automation Wizard
- Posts: 1108
- Joined: Wed Dec 04, 2002 10:28 am
- Location: Hong Kong
Post
by armsys » Mon Oct 19, 2015 9:12 pm
Thanks for your confirmation and clarification.