Page 1 of 1
on-click scripts when a space in the folder name
Posted: 19 Sep 2012 04:05
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?
Re: on-click scripts when a space in the folder name
Posted: 19 Sep 2012 05:31
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.
Re: on-click scripts when a space in the folder name
Posted: 19 Sep 2012 09:10
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"
Re: on-click scripts when a space in the folder name
Posted: 19 Sep 2012 13:18
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.
Re: on-click scripts when a space in the folder name
Posted: 19 Sep 2012 13:38
by admin
Bingo.
