Page 16 of 28

Re: Minor scripting related wishes (a generic thread)

Posted: 12 May 2014 20:22
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()

Re: Minor scripting related wishes (a generic thread)

Posted: 17 May 2014 09:36
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

Re: Minor scripting related wishes (a generic thread)

Posted: 17 May 2014 10:02
by admin
Nice try. One day programming might work like this. :)

Re: Minor scripting related wishes (a generic thread)

Posted: 17 May 2014 12:12
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.

Re: Minor scripting related wishes (a generic thread)

Posted: 18 May 2014 13:53
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...

Re: Minor scripting related wishes (a generic thread)

Posted: 18 May 2014 15:24
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

Re: Minor scripting related wishes (a generic thread)

Posted: 18 May 2014 15:31
by bdeshi
Well, permanent variables DO act like your universal variables if you uncheck "remember permanent variables"... :whistle:

Re: Minor scripting related wishes (a generic thread)

Posted: 18 May 2014 16:44
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

Re: Minor scripting related wishes (a generic thread)

Posted: 21 May 2014 08:18
by bdeshi
Another wish: It'd be nice to have folderlist() sort folders first, like !dir /S /O:g <curpath> does.

Re: Minor scripting related wishes (a generic thread)

Posted: 21 May 2014 14:59
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:"

Re: Minor scripting related wishes (a generic thread)

Posted: 21 May 2014 15:05
by admin
Ok. :)

Re: Minor scripting related wishes (a generic thread)

Posted: 21 May 2014 16:26
by TheQwerty
Thank you! :beer:

Re: Minor scripting related wishes (a generic thread)

Posted: 23 May 2014 12:35
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 :)

Re: Minor scripting related wishes (a generic thread)

Posted: 01 Jun 2014 17:05
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

Re: Minor scripting related wishes (a generic thread)

Posted: 01 Jun 2014 17:15
by admin
Not possible even for me. You cannot select a new tab without activating the pane first.