Page 28 of 28
Re: Minor scripting related wishes (a generic thread)
Posted: 05 Oct 2017 22:10
by bdeshi
[Re: tab ID.]
I can get a tab ID for any given index, but the reverse does not seem to apply.
Code: Select all
::echo tab('get', 'id', $tab_index); //returns the ID for any given $index
::echo tab('get',, 4:=$tab_id); // always returns _current tab_'s index
Bug?
Re: Minor scripting related wishes (a generic thread)
Posted: 06 Oct 2017 15:51
by admin
No, it's consistent with the help file:
Code: Select all
data:
[empty or missing]: returns the index of the current tab (first tab = 1)
But I added something for you:
Code: Select all
+ SC tab enhanced: The operation "get" got a new data parameter "index":
text tab("get", "index", [index], [ID]); //return index
Re: Minor scripting related wishes (a generic thread)
Posted: 06 Oct 2017 17:11
by bdeshi
Thanks for the addition, I can work with that.
Although to provide some honest feedback, I think this is a little confusing: tab('get') now has the empty parameter which returns index, and also a index parameter.
After you added the ID parameter, I assumed all tab() operations would work with either index or ID parameters, index having more weight. Possible? Not a big issue though.
Re: Minor scripting related wishes (a generic thread)
Posted: 06 Oct 2017 17:15
by admin
I thought about that but did not do it to avoid breaking old code.
Re: Minor scripting related wishes (a generic thread)
Posted: 30 Oct 2017 05:09
by bdeshi
Another request for tab(): allow tab() operations with tabs in the inactive pane (without activating that pane). Would this be easy?
Code: Select all
+ SC tab enhanced: New parameter "pane" enables tab operations on both panes.
Syntax: text tab([operation], [data], [index], [ID], [pane])
pane: the affected pane.
a active [default]
i inactive
1 1st pane
2 2nd pane
Example:
tab("new", "C:\",,, 2); //new foreground tab at "C:\" on the inactive pane
tab("relocate", "<xydata>",,, "i"); //go to <xydata> on the current tab of the inactive pane
Re: Minor scripting related wishes (a generic thread)
Posted: 30 Oct 2017 09:22
by admin
Uuuh, tricky, dangerous, madness.... I would touch this only with 4 weeks of free debugging time ahead. = Not now, sorry.
Re: Minor scripting related wishes (a generic thread)
Posted: 30 Oct 2017 09:38
by highend
I would touch this only with 4 weeks of free debugging time ahead
Nonetheless, +5
Re: Minor scripting related wishes (a generic thread)
Posted: 30 Oct 2017 14:04
by bdeshi
okay, it's fine. (I might annoy you later.
)
Re: Minor scripting related wishes (a generic thread)
Posted: 23 Mar 2018 13:39
by highend
I'd like to request what was already wished before (
viewtopic.php?p=137789#p137789),
a <space> variable.
I'd need it for a more complex script with heredocs (template building), where arbitrary space numbers are a necessity...
Code: Select all
$header
<space 3>
<space 3>$title<space 5>$content<space 7>$sep
$footer
etc.
These space vars differentiate between each heredoc so I don't want to define a whole bunch of strrepeats...
Re: Minor scripting related wishes (a generic thread)
Posted: 23 Mar 2018 13:56
by admin
Ok, next beta.
Re: Minor scripting related wishes (a generic thread)
Posted: 23 Mar 2018 13:58
by highend
Thanks a lot!
Re: Minor scripting related wishes (a generic thread)
Posted: 11 Apr 2019 07:36
by bdeshi
Hey Don, can you make a couple enhancement to the patchimage scripting functionality?
• return current patch file path(s) for an image key.
• return list of all valid keys / boolean return to test if some string is a valid key.
(That command probably needs to become a function.)
Thanks.
Re: Minor scripting related wishes (a generic thread)
Posted: 12 Apr 2019 10:22
by admin
Not as easy as it might seem. This is something for a later phase...