A new variable : <clipboard>
Posted: 10 Feb 2008 13:02
I'd love a new variable to be added : <clipboard>
I don't really have to explain what it would be, do I?
I don't really have to explain what it would be, do I?
Forum for XYplorer Users and Developers
https://www.xyplorer.com/xyfc/
No, but I'd like for example to have a script that :PeterH wrote:...you want to read, what you wrote by copytext[a]?
Yes, I already thought of some basic string functions. Later...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.
Question: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?
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.admin wrote:Question:
- what if the clipboard is empty?
- what if the clipboard holds an image?
empty clipboard = emptystringadmin wrote:Question: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?
- 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.admin wrote:Question: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?
- what if the clipboard is empty?
- what if the clipboard holds an image?
Ah, you wanted only the text?! I made it to return any files a well (converted to text, one per line).jacky wrote: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.admin wrote:Question: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?
- what if the clipboard is empty?
- what if the clipboard holds an image?
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?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.admin wrote:Ah, you wanted only the text?! I made it to return any files a well (converted to text, one per line).