Escaped Double Quotes treated as @

Asked by Ned

Hello,

The following variable holds the location of a directory that I wish to provide to the CMD prompt
If I print the following from within Sikuli, it looks correct; but when running the script the double quotes appear as at symbols (@)

sCurrentDBDir = ('\"C:\\Integra\\Data\\Testing Databases\\Current DB\\\" ')

When the script is run, I get the following:
@C:\Integra\Data\Testing Databases\Current DB\@

Any help would onceagain be appreciated

Question information

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

If you use type(sCurrentDBDir), then look faq 922.

If not, then please provide more details, what exactly you are doing.

Revision history for this message
Ned (nedleonard) said :
#2

sChangeDir = "cd "
sCurrentDBDir = ('\"C:\\Integra\\Data\\Testing Databases\\Current DB\\\" ')

sCMDArgs = (sChangeDir,sCurrentDBDir,Key.ENTER)

runCMD(sTestId,*sCMDArgs)

def runCMD(sTestId,*sCMDArgs):
    openNewCmdPrompt()
    for arg in sCMDArgs:
        type(arg)

The above code types @C:\Integra\Data\Testing Databases\Current DB\@ into the new Command Prompt instead of using double quotes

Revision history for this message
Best RaiMan (raimund-hocke) said :
#3

so you in fact are using type() and hence have to look into faqs 933 (sorry for the wrong link)

Revision history for this message
Ned (nedleonard) said :
#4

However, I have just discovered that if you enter @ instead of \" for an escaped double quote, it prints as a double quote in the command prompt. The two seem to be reversed :)

Revision history for this message
Ned (nedleonard) said :
#5

Thanks RaiMan, that solved my question.

Revision history for this message
RaiMan (raimund-hocke) said :
#6

the explanation is in faq 933.

on an US-keyboard the @ is on the key 2.

you have a keyboard, where the " is on the key 2.

so typing a " gives you a @ and vice versa.

Since internally the key codes on the Java level are bound to the US-keyboard layout, you get this effect.

I hope, some day in the future I can fix this problem.