A new variable : <clipboard>

Features wanted...
Post Reply
jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

A new variable : <clipboard>

Post by jacky »

I'd love a new variable to be added : <clipboard>
I don't really have to explain what it would be, do I? ;)
Proud XYplorer Fanatic

PeterH
Posts: 2827
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Post by PeterH »

...you want to read, what you wrote by copytext[a]? :)

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

PeterH wrote:...you want to read, what you wrote by copytext[a]? :)
No, but I'd like for example to have a script that :
- goes somewhere
- select all files
- move/copy/compress/whatever with them
- goes back where i was before
- tell me : ok, it's done, and list all the files that were "affected". I know I can copy their names (using To Clipboard commands) but I can't use that in msg/text or anywhere for that matter... I'd like that! :)
Proud XYplorer Fanatic

PeterH
Posts: 2827
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Post by PeterH »

Hi Jacky,
I could think of re-reading the just set clipboard to verify what I have set, (for test before I really use it,) but I also thought of reading "other" info from there.
(But, as often, wanted to make a little joke there :) )

Now these jokes can be quite useful - I didn't have that idea you mentioned! Really good!
...but "only" for varification of the list - as you get a quite long list in one variable, and cannot refer to single entries. Shure it could make sense to read it and react on some contents...
..so it would be fine to have a ::substring (or a substring-subfunction for ::set) to extract "items" of a text-string. for example the 3rd line, or the 5th word, etc.
(Sorry, Don, for the next wish - ok, call it idea...
...and it still can get harder...)

and I'm afraid that would make need of loops, and of IF, ...
OK - next version? Next week :roll:

admin
Site Admin
Posts: 66294
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

PeterH wrote:..so it would be fine to have a ::substring (or a substring-subfunction for ::set) to extract "items" of a text-string. for example the 3rd line, or the 5th word, etc.
Yes, I already thought of some basic string functions. Later...

admin
Site Admin
Posts: 66294
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: A new variable : <clipboard>

Post by admin »

jacky wrote:I'd love a new variable to be added : <clipboard>
I don't really have to explain what it would be, do I? ;)
Question:
- what if the clipboard is empty?
- what if the clipboard holds an image?

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: A new variable : <clipboard>

Post by j_c_hallgren »

admin wrote:Question:
- what if the clipboard is empty?
- what if the clipboard holds an image?
Maybe that usage of <clipboard> wouldn't be valid (or it would be null value) unless it has been previously set within the script? Because clipboard could have all kinds of stuff from external sources, including bitmaps, spreadsheet data, etc. when script begins...and it seems that script can likely only set it to more plain text values that would then be able to be used later in script.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

fishgod
Posts: 231
Joined: 03 Feb 2008 00:40
Location: Sankt Augustin (near Bonn), Germany

Re: A new variable : <clipboard>

Post by fishgod »

admin wrote:
jacky wrote:I'd love a new variable to be added : <clipboard>
I don't really have to explain what it would be, do I? ;)
Question:
- what if the clipboard is empty?
- what if the clipboard holds an image?
empty clipboard = emptystring
image in clipboard = #image
somthing other than text in clipboard = #something (where something is not the content, but the type of the content, when you can determine it, else #unknown, or something)

??
Operating System: Win10 x64 / Win11 x64 / almost allways newest XY-beta
totally XYscripting-addicted

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: A new variable : <clipboard>

Post by jacky »

admin wrote:
jacky wrote:I'd love a new variable to be added : <clipboard>
I don't really have to explain what it would be, do I? ;)
Question:
- what if the clipboard is empty?
- what if the clipboard holds an image?
Just returns nothing, both case. Open your text editor and press Ctrl+V when the clipboard is empty/contains an image, files, some other data, what happens : nothing. That's the expected behavior.
Proud XYplorer Fanatic

admin
Site Admin
Posts: 66294
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: A new variable : <clipboard>

Post by admin »

jacky wrote:
admin wrote:
jacky wrote:I'd love a new variable to be added : <clipboard>
I don't really have to explain what it would be, do I? ;)
Question:
- what if the clipboard is empty?
- what if the clipboard holds an image?
Just returns nothing, both case. Open your text editor and press Ctrl+V when the clipboard is empty/contains an image, files, some other data, what happens : nothing. That's the expected behavior.
Ah, you wanted only the text?! I made it to return any files a well (converted to text, one per line).

fishgod
Posts: 231
Joined: 03 Feb 2008 00:40
Location: Sankt Augustin (near Bonn), Germany

Re: A new variable : <clipboard>

Post by fishgod »

admin wrote:Ah, you wanted only the text?! I made it to return any files a well (converted to text, one per line).
maybe something like <clipboard> returns all the text included and <clipboard,n> returns the line with the number n, if there are more then one?
Operating System: Win10 x64 / Win11 x64 / almost allways newest XY-beta
totally XYscripting-addicted

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: A new variable : <clipboard>

Post by jacky »

admin wrote:Ah, you wanted only the text?! I made it to return any files a well (converted to text, one per line).
Well, I pretty much focused on text only yes, and had in mind other data type like pictures, etc.
I throw files in the mix without really thinking about it. :roll: But putting the path/names of files in the clipboard might be a good thing actually, so don't remove it! ;)
Proud XYplorer Fanatic

PeterH
Posts: 2827
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Post by PeterH »

My opinion: only return the list, i.e. the names of the files, or whatever.

On the other side, (later on,) there should be a command supporting file-I/O. Then, if you have a filename, you can read or write or do what you want. But I think that's a level of logic, that's too much at the moment.
(As, for handling that, you need "higher" comands like loops, IF, ...)

Post Reply