goto command always open new tab

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

goto command always open new tab

Post 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.

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

Re: goto command always open new tab

Post by admin »

This is by design: holding Shift always opens the destination in a new tab.

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: goto command always open new tab

Post 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.)

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

Re: goto command always open new tab

Post 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.

Papoulka
Posts: 455
Joined: 13 Jul 2013 23:41

Re: goto command always open new tab

Post 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

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

Re: goto command always open new tab

Post by admin »

OK, I expected this... :whistle: ... I'll try to do something about it...

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

Re: goto command always open new tab

Post by TheQwerty »

Fix confirmed in v17.00.0008.

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: goto command always open new tab

Post by LittleBiG »

Now it is great, thanks.

Post Reply