Any way to detect if clipboard content was cut or copied?
The pasteto cmd may be the usual solution, but I have to process the clipped items before pasting, so I have to choose between copyto and moveto.
Or, can pasteto be enhanced to supply a target item name as well? Currently it only accepts a destination path.
scripting: detect copy or cut
scripting: detect copy or cut
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: scripting: detect copy or cut
...basic differentiation between image or text, as well as a way to properly paste one or the other would be a plus, here.
\sorry, Sammay!
\sorry, Sammay!
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...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: scripting: detect copy or cut
Next version you can use this new undocumented argument to SC get():
Returned is a bit field:
fdDropEffectNone = 0
fdDropEffectCopy = 1
fdDropEffectMove = 2
fdDropEffectLink = 4
Usually "Copy" items return "5" (1+4), "Cut" items return "2".
Code: Select all
text get("clipboarddropeffect");
fdDropEffectNone = 0
fdDropEffectCopy = 1
fdDropEffectMove = 2
fdDropEffectLink = 4
Usually "Copy" items return "5" (1+4), "Cut" items return "2".
FAQ | XY News RSS | XY Twitter
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: scripting: detect copy or cut
Ha, that's not so easy. Here is another undocumented argument for you:SkyFrontier wrote:...basic differentiation between image or text, as well as a way to properly paste one or the other would be a plus, here.
\sorry, Sammay!
Code: Select all
text <get clipboardformats <crlf>>;
FAQ | XY News RSS | XY Twitter
Re: scripting: detect copy or cut
wonderful, thanks!admin wrote:Next version you can use this new undocumented argument to SC get():
Code: Select all
text get("clipboarddropeffect");
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: scripting: detect copy or cut
Great, I'll check it out and see what I can when I track the projects I needed this function. Thanks!admin wrote:Ha, that's not so easy. Here is another undocumented argument for you:SkyFrontier wrote:...basic differentiation between image or text, as well as a way to properly paste one or the other would be a plus, here.
\sorry, Sammay!
Code: Select all
text <get clipboardformats <crlf>>;
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...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...