Toolbar button cannot run script when filename contains "{"

Things you’d like to miss in the future...
Post Reply
Norn
Posts: 416
Joined: 24 Oct 2021 16:10

Toolbar button cannot run script when filename contains "{"

Post by Norn »

I never put {} in the filename. :|

Code: Select all

//Open in new tab
foreach($item, "<get selecteditemspathnames>", "<crlf>") {
   if(exists($item) == "1") {$path = gpc($item, "path"); tab("new", $path); selectitems $item;
                            } else {
				       tab("new", $item);}
   }
Attachments
CTB-Open in new tab.png
CTB-Open in new tab.png (104.41 KiB) Viewed 486 times
Win10, Win11 @100% 2560x1440 22H2

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

Re: Toolbar button cannot run script when filename contains "{"

Post by admin »

Works fine here.

1) Describe "Cannot run" in more detail.

2) Show the full definition of the button. (Right-click the Clear button in Edit User Button and select Copy Snippet.)

Norn
Posts: 416
Joined: 24 Oct 2021 16:10

Re: Toolbar button cannot run script when filename contains "{"

Post by Norn »

Norn wrote: 23 Sep 2022 20:46 I never put {} in the filename. :|

Code: Select all

//Open in new tab
foreach($item, "<get selecteditemspathnames>", "<crlf>") {
   if(exists($item) == "1") {$path = gpc($item, "path"); tab("new", $path); selectitems $item;
                            } else {
				       tab("new", $item);}
   }
I copied this script and it works now. :shock:
Win10, Win11 @100% 2560x1440 22H2

Post Reply