how to create a screenshot?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
tiago
Posts: 589
Joined: 14 Feb 2011 21:41

how to create a screenshot?

Post by tiago »

#206; (ctrl+shift+alt+v) creates a screenshot.
But how do I create a file containing print screen input into a folder other than <curpath>?
writefile("<path>clip.png", "<clipboard>", r, b); didn't made it.
"new" doesn't seem to support content, rather strangely does it for a [source].
Power-hungry user!!!

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: how to create a screenshot?

Post by SkyFrontier »

Made some experiments with technology shared here but am going nowhere.

What I find strange is: XYplorer *CAN* differentiate whether <clipboard> content is an image or not, thus allowing Paste Special, "paste image here into new png file".

I guess you were generically speaking with your code. Anyway, the correct syntax would look like

Code: Select all

writefile("<curpath>\" . "clip.png", "<clipboard>", r, b);
which just writes a zero-sized file.

If <clipboard> (IMAGE!) could be a valid source for writefile, then your issue is easy to solve - you seem to know it.

Tiago said:
...other than <curpath>?
Well. It's not working either into <curpath>, so I find your sentence a bit strange.

Any other thoughts on this, people?
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

totmad1
Posts: 131
Joined: 24 Jun 2013 12:37

Re: how to create a screenshot?

Post by totmad1 »

A "dirty way" of doing it is to use moveto
i.e

Code: Select all

 "Screen Cap && moveto PicTemp"  #206; $file = <curitem>;
              $ext= getpathcomponent( "$file", "ext");
             if ($ext == "png") {
             moveto "C:\Users\user\Pictures\PicTemp\" ;
             #340; goto "C:\Users\user\Pictures\PicTemp\";
             }
totmad1 (totally mad one)

Post Reply