Minor scripting related wishes (a generic thread)
Re: Minor scripting related wishes (a generic thread)
Don, can you please add an option to the SC download to suppress the failure message for download where it throws a "Download failed for URL" - Error 404
Ignore - I forgot about exists()
Ignore - I forgot about exists()
Last edited by nerdweed on 17 May 2014 11:51, edited 1 time in total.
Re: Minor scripting related wishes (a generic thread)
Don, if I add this to history.txt will I be able to use this function or does it obey only you
+ Scripting got a new function.
Name: fetch
Action: Shows only n lines / items from a file / delimited variable
Syntax: fetch(input, value, [pos], [delimiter], [input type])
input: Either a variable or filename
value: No of items / lines to be fetched
pos: starting position to start fetching the contents from. Defaults to 1
delimiter: Defaults to | for variables and <crlf> for files
input type: f - file
v - variable
return: n values
-
- Site Admin
- Posts: 60558
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Minor scripting related wishes (a generic thread)
Nice try. One day programming might work like this.
FAQ | XY News RSS | XY Twitter
Re: Minor scripting related wishes (a generic thread)
I tried to write history.txt_user and found what stupid stuff I asked for. I can do this easily with gettoken and readfile (in much less time than I spent in writing that wish). Sorry.
BTW, it would be good to expose the variable storing the tagged database items. I am trying to do some cheeky things.
BTW, it would be good to expose the variable storing the tagged database items. I am trying to do some cheeky things.
Re: Minor scripting related wishes (a generic thread)
Another wish: readpv() and writepv() should be able to work with particular variables. Imaginary examples follow:
only writes listed variables:
writepv [file], ['p_me,p_metoo,p_they'];
Only reads in p_me and p_metoo:
readpv [file], ['*me*'];
Although maybe filtering can be left for later...
only writes listed variables:
writepv [file], ['p_me,p_metoo,p_they'];
Only reads in p_me and p_metoo:
readpv [file], ['*me*'];
Although maybe filtering can be left for later...
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Minor scripting related wishes (a generic thread)
I have been thinking on lines of universal variables - just like global but remain active throughout the session
- just like perm when perms are not written to disk
- just like perm when perms are not written to disk
Re: Minor scripting related wishes (a generic thread)
Well, permanent variables DO act like your universal variables if you uncheck "remember permanent variables"...
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Minor scripting related wishes (a generic thread)
I am greedy. I need both.
I require some PVs across sessions. - Write them
Some are valid only for a session/it's good to recalculate them in a new session. - No need to write them, but have to
I require some PVs across sessions. - Write them
Some are valid only for a session/it's good to recalculate them in a new session. - No need to write them, but have to
Re: Minor scripting related wishes (a generic thread)
Another wish: It'd be nice to have folderlist() sort folders first, like !dir /S /O:g <curpath> does.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Minor scripting related wishes (a generic thread)
Wish: Two additions to SC get('#CID');
#813 = Sync Scroll
#814 = Sync Browse
Now that there are more than "a couple" CIDs supported, 29 if the above are added , the description of this info parameter should probably become:
"Returns the current state, or corresponding specified value, for the following two-state Command IDs:"
or
"Returns the current state, or corresponding specified value, for the following Command ID toggles:"
#813 = Sync Scroll
#814 = Sync Browse
Now that there are more than "a couple" CIDs supported, 29 if the above are added , the description of this info parameter should probably become:
"Returns the current state, or corresponding specified value, for the following two-state Command IDs:"
or
"Returns the current state, or corresponding specified value, for the following Command ID toggles:"
Re: Minor scripting related wishes (a generic thread)
Just cheekily bumping this one, if I may, to check if you noticed it Don. You said that there was a chance after 14.10, so I am hoping you can squeeze in that and adding "on_collision" flag to copyto SC at some point soon. Dankezer0 wrote:With the above in mind, could you please add a flag to the backupto() to have it pre-scan the destination? I appreciate that doing so may have a small performance penalty, but I do think it is worth doing for such significant improvement.
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
Re: Minor scripting related wishes (a generic thread)
With the recent and very welcome updates to layout, when setting up various layouts via scripting, it would be a great to be able to directly set a tab position in the inactive pane. We can now only "seltab" position in the active pane which means we have to make it active. I know we can do it indirectly, but it would be extremely uselful and reduce possible flickering if we could use "seltab" directly on the inactive pane.
Thanks,
Ken
Code: Select all
seltab [position], [pane], [mru] ...with pane defaulting to active "a", but you could also use "i" for the inactive pane
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440
-
- Site Admin
- Posts: 60558
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Minor scripting related wishes (a generic thread)
Not possible even for me. You cannot select a new tab without activating the pane first.
FAQ | XY News RSS | XY Twitter