I have :
Bentley = C:\\WINDOWS\\system32\\
I want
Bentley = "C:\\WINDOWS\\system32\\"
this won't work
Bentley = ""C:\\WINDOWS\\system32\\""
Professional Software Development Tools
I have :
Bentley = C:\\WINDOWS\\system32\\
I want
Bentley = "C:\\WINDOWS\\system32\\"
this won't work
Bentley = ""C:\\WINDOWS\\system32\\""
Try -
Code:Bentley = \"C:\\WINDOWS\\system32\\\"
You might want to take a look at the Global Variables:
_SystemFolder, _WindowsFolder, etc.
Thanks guys
Cool, but if I have a variable, how would that work?
Var = C:\\WINDOWS\\system32
Bentley = \"..Var..\\\" ??? Will this work?
Use _SystemFolder as-is:
Or just:Code:Bentley = _SystemFolder; exeFile = "cmd.exe"; pathToExeFile = Bentley .. "\\" .. exeFile; Shell.Execute (pathToExeFile, "open", "", "", SW_SHOWNORMAL, false);
Code:exeFile = "cmd.exe"; pathToExeFile = _SystemFolder .. "\\" .. exeFile; Shell.Execute (pathToExeFile, "open", "", "", SW_SHOWNORMAL, false);
Thanks, but that path is just a sample:
Here is the actual script:
for x = 1,4 do
Sound = XML.GetValue(strXMLPath.."/audioanswer"..x.."");
AudiA = (WereAreThow..Sound)
Button.SetProperties("Answer"..x,{ClickSound=2});
Button.SetProperties("Answer"..x,{ClickSoundFile= AudiA});
You see AudiA needs the "" , so how do I get the content of AudiA between " "
In general terms when you want to include a control character e.g. / or " etc in a string, then you need to escape it. To do so you precede it with \
AudiA = "\"..AudiA.."\" Like this?
Thanks, worked it out:
AudiA = "\""..AudiA.."\""
!!!
Do it within your concatenation. Say I was setting the text for a label then -
p.s. -- Oh right - too lateCode:txt = "Something" Label.SetText("Label1", "\""..txt.."\"");![]()
I need help!!!!! Nothing wants to work today!!!!
for x = 1,4 do
AnswerD = "Answer"..x..""
Answer = "\""..AnswerD.."\""
Bentley = \"C:\\WINDOWS\\system32\\wowsound\\\"
Button.SetProperties(Answer,{ClickSound="2"}); Button.SetProperties(Answer,{ClickSoundFile=Bentle y});
WON"T WORK AT ALL!!!!!!!!
PLEASE>>>>>
Why don't you post you project?
Hard to make out what is going on with partial code.
All I want to do is change a buttons "on click sound" in the form of a variable:
for x = 1,4 do
AnswerD = "Answer"..x..""
Answer = "\""..AnswerD.."\""
Bentley = \"C:\\WINDOWS\\system32\\wowsound\\sound.wav\\\ "
Not Working:
Button.SetProperties(Answer,{ClickSound="2"});
Button.SetProperties(Answer,{ClickSoundFile= Bentley});
Working:
Button.SetProperties("Answer1",{ClickSound="2"});
Button.SetProperties("Answer1",{ClickSoundFile=""C :\\WINDOWS\\system32\\wowsound\\sound.wav"});
Works? Why
Last edited by ronwilliams; 03-08-2010 at 05:18 AM.
Why so complicated (and syntatically-incorrect)
??Code:Bentley = \"C:\\WINDOWS\\system32\\wowsound\\sound.wav\\\ "
~ You cannot have a \ before the "
~ you cannot have \\\
When you try this the complier says so!
Just use
Code:Bentley = _SystemFolder .. "\\wowsound\\sound.wav"