on-click scripts when a space in the folder name

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
swsjetyn
Posts: 10
Joined: 21 Jan 2011 07:02

on-click scripts when a space in the folder name

Post by swsjetyn »

When I press the user button's "on click" or "on right-click" menu, and then edit the "on-click script", such as a script with

"PDFXCview|E:\Portable\PDF-XChange4 Viewer\PDFXCview.exe" run """E:\Portable\PDF-XChange4 Viewer\PDFXCview.exe"""

because of a space in the folder name, i must input 3 times of semicolon, or there will be a parsed error repot.

Another expression is still work:
"PDFXCview|E:\Portable\PDF-XChange4 Viewer\PDFXCview.exe" run '"E:\Portable\PDF-XChange4 Viewer\PDFXCview.exe"'

but the expression followed is not work:
"PDFXCview|E:\Portable\PDF-XChange4 Viewer\PDFXCview.exe" run "'E:\Portable\PDF-XChange4 Viewer\PDFXCview.exe'"

Is this a bug?

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: on-click scripts when a space in the folder name

Post by serendipity »

swsjetyn wrote:When I press the user button's "on click" or "on right-click" menu, and then edit the "on-click script", such as a script with

"PDFXCview|E:\Portable\PDF-XChange4 Viewer\PDFXCview.exe" run """E:\Portable\PDF-XChange4 Viewer\PDFXCview.exe"""

because of a space in the folder name, i must input 3 times of semicolon, or there will be a parsed error repot.

Another expression is still work:
"PDFXCview|E:\Portable\PDF-XChange4 Viewer\PDFXCview.exe" run '"E:\Portable\PDF-XChange4 Viewer\PDFXCview.exe"'

but the expression followed is not work:
"PDFXCview|E:\Portable\PDF-XChange4 Viewer\PDFXCview.exe" run "'E:\Portable\PDF-XChange4 Viewer\PDFXCview.exe'"

Is this a bug?
Not a bug, for run command you should have single quotes outside of double quotes. Other way does not work. Read Help>Scripting Command reference>run for how to quote run command.

swsjetyn
Posts: 10
Joined: 21 Jan 2011 07:02

Re: on-click scripts when a space in the folder name

Post by swsjetyn »

serendipity wrote:Not a bug, for run command you should have single quotes outside of double quotes. Other way does not work. Read Help>Scripting Command reference>run for how to quote run command.
But when there is no space in the folder name, just need only one quote, not 3 quote.
I think a better solution is that we need type only 1 quote any time.

Here is a example which is working.
"WINSCP|E:\Portable\WinSCP4.35\WinSCP.exe" run "E:\Portable\WinSCP4.35\WinSCP.exe"

RalphM
Posts: 2145
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: on-click scripts when a space in the folder name

Post by RalphM »

While I agree that it would make the scripters life easier, I believe there's a technical reason for it, otherwise Don would have made it easy for the crowd.
Ralph :)
(OS: W11 26H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)

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

Re: on-click scripts when a space in the folder name

Post by admin »

Bingo. :)

Post Reply