Page 1 of 1

goto command always open new tab

Posted: 14 Jul 2016 13:03
by LittleBiG
If I create a toolbar button with this script:

Code: Select all

//goto_test
  goto "c:\Documents";
  goto "c:\Downloads", 0;
and I start the script (press the toolbar button) with the Shift pressed down, each goto command opens a new tab, even if the parameter 0 (reuse the current tab) is added. It can really mess up a script.

Re: goto command always open new tab

Posted: 14 Jul 2016 13:23
by admin
This is by design: holding Shift always opens the destination in a new tab.

Re: goto command always open new tab

Posted: 14 Jul 2016 15:05
by LittleBiG
admin wrote:This is by design: holding Shift always opens the destination in a new tab.
I know. And it is OK if not a script behind the toolbar button. For me, it makes possible to use the Shift modifier to add a function to it, and created many unnecessary and surprising tabs.

(Now I can see only one solution: check the pressed state of the Shift at the beggining of the script, and after all goto I have to take care of closing the tab. Not nice at all.)

Re: goto command always open new tab

Posted: 14 Jul 2016 16:13
by TheQwerty
Tend to agree with LittleBiG, the state of the keyboard should not have any affect on the how scripting commands function - aside from Get('Shift') obviously.

Re: goto command always open new tab

Posted: 14 Jul 2016 17:01
by Papoulka
I agree that it would be nice if such scripts could use Shift without creating a new tab. Many of my User scripts watch for Shift to mean "run without further confirmations" - very convenient but it doesn't work as intended if there's a Goto. This was discussed here:
viewtopic.php?f=2&t=14795

Re: goto command always open new tab

Posted: 14 Jul 2016 17:20
by admin
OK, I expected this... :whistle: ... I'll try to do something about it...

Re: goto command always open new tab

Posted: 14 Jul 2016 19:39
by TheQwerty
Fix confirmed in v17.00.0008.

Re: goto command always open new tab

Posted: 15 Jul 2016 12:05
by LittleBiG
Now it is great, thanks.