Paste paths including ""

Asked by Ezequiel

Hi all I need pass parameters including "" because windows needs "" to understand the path "Program Files\xxx"
How can I pass the parameter: C:\Program Files\\"+msg with "" like "C:\Program Files\HELLO\HELLOAppStore"

My sikuli code is :

path= input("ENTER BRAND NAME:") # Dixons, etc.

if path== "HELLO" :
   msg = "HELLO\HELLOAppStore"

type("r", KeyModifier.WIN) #open run
paste("C:\Automation\sikuli endpoints\endpoints_changer.bat C:\Program Files\\"+msg)
type("\n")
*******************************************************************************************
I get an error because endpoint_changer.bat understands only "c:\Program" as a parameter because the space between word Program and word Files.

The "endpoints_changer.bat" detail :

set_end_points.vbs %1 http://127.0.0.1:29/agr-be/analyticService.asmx ......(continue)

%1 is waiting for "C:\Program Files\HELLO\HELLOAppStore"

Please help me.
Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Ezequiel
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Try the following:

paste( 'C:\Automation\sikuli endpoints\endpoints_changer.bat "C:\Program Files\' + msg + '"' )

we use single quotes for the strings, so we can use the apostrophe inside as normal character, which will be pasted as such to the text field in the run box.

... m Files\' + msg + '"' )
the last part is the trailing apostrophe for the path name parameter as a single quoted string.

Hope it is clear and helps.

Revision history for this message
Ezequiel (pollakezequiel) said :
#2

Hi Raiman

I tried this and works PERFECT!!

paste( 'C:\Automation\sikuli endpoints\endpoints_changer.bat "C:\Program Files\\' + msg + '"' )

Thankss a lot!!