Minor scripting related wishes (a generic thread)

Features wanted...
nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: Minor scripting related wishes (a generic thread)

Post by nerdweed »

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()
Last edited by nerdweed on 17 May 2014 11:51, edited 1 time in total.

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: Minor scripting related wishes (a generic thread)

Post by nerdweed »

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

admin
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)

Post by admin »

Nice try. One day programming might work like this. :)

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: Minor scripting related wishes (a generic thread)

Post by nerdweed »

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). :oops: Sorry.

BTW, it would be good to expose the variable storing the tagged database items. I am trying to do some cheeky things.

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by bdeshi »

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...
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: Minor scripting related wishes (a generic thread)

Post by nerdweed »

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

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by bdeshi »

Well, permanent variables DO act like your universal variables if you uncheck "remember permanent variables"... :whistle:
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: Minor scripting related wishes (a generic thread)

Post by nerdweed »

I am greedy. I need both. :mrgreen:
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

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by bdeshi »

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 ]

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Minor scripting related wishes (a generic thread)

Post by TheQwerty »

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:"

admin
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)

Post by admin »

Ok. :)

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Minor scripting related wishes (a generic thread)

Post by TheQwerty »

Thank you! :beer:

zer0
Posts: 2673
Joined: 19 Jan 2009 20:11

Re: Minor scripting related wishes (a generic thread)

Post by zer0 »

zer0 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.
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. Danke :)
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

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Minor scripting related wishes (a generic thread)

Post by klownboy »

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.

Code: Select all

seltab [position], [pane], [mru]    ...with pane defaulting to active "a", but you could also use "i" for the inactive pane
Thanks,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

admin
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)

Post by admin »

Not possible even for me. You cannot select a new tab without activating the pane first.

Post Reply