Minor scripting related wishes (a generic thread)

Features wanted...
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 »

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

admin
Site Admin
Posts: 60288
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Minor scripting related wishes (a generic thread)

Post 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

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 »

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

admin
Site Admin
Posts: 60288
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by admin »

I thought about that but did not do it to avoid breaking old code.

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

admin
Site Admin
Posts: 60288
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by admin »

Uuuh, tricky, dangerous, madness.... I would touch this only with 4 weeks of free debugging time ahead. = Not now, sorry.

highend
Posts: 13260
Joined: 06 Feb 2011 00:33

Re: Minor scripting related wishes (a generic thread)

Post by highend »

I would touch this only with 4 weeks of free debugging time ahead
Nonetheless, +5
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

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 »

okay, it's fine. (I might annoy you later. :whistle: )
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

highend
Posts: 13260
Joined: 06 Feb 2011 00:33

Re: Minor scripting related wishes (a generic thread)

Post 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...
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

admin
Site Admin
Posts: 60288
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, next beta.

highend
Posts: 13260
Joined: 06 Feb 2011 00:33

Re: Minor scripting related wishes (a generic thread)

Post by highend »

Thanks a lot! :tup:
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

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 »

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

admin
Site Admin
Posts: 60288
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 as easy as it might seem. This is something for a later phase...

Post Reply