fmen Posted July 30, 2007 Share Posted July 30, 2007 Run ( @Comspec & ' /c "D:\Vis.stw"', '', @SW_HIDE ) Works fine. $Drive = StringLeft(@ScriptDir, 1) Run ( @Comspec & ' /c $Drive & ":\Vis.stw"', '', @SW_HIDE ) This does not! MsgBox(4096,"control", $Drive) gives me the correct drive letter "D" What am I doing wrong? Do I have some , or ' or " or ( or ) in the wrong place? I've tried every combination possible. Thanks Link to comment Share on other sites More sharing options...
cramaboule Posted July 30, 2007 Share Posted July 30, 2007 (edited) Run ( @Comspec & ' /c "D:\Vis.stw"', '', @SW_HIDE ) Works fine.$Drive = StringLeft(@ScriptDir, 1)Run ( @Comspec & ' /c $Drive & ":\Vis.stw"', '', @SW_HIDE )This does not!MsgBox(4096,"control", $Drive) gives me the correct drive letter "D"What am I doing wrong?Do I have some , or ' or " or ( or ) in the wrong place? I've tried every combination possible. ThanksTry:Run ( @Comspec & " /c" & chr(34)& $Drive & chr(34)& ":\Vis.stw", '', @SW_HIDE )or some thing like that... Edited July 30, 2007 by cramaboule My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 30, 2007 Share Posted July 30, 2007 The problem was that the second time, you had the string ' /c $Drive & ":\Vis.stw"'oÝ÷ Ù.¦ël¢g¢+µ©í¶§È§²'^¶¬¶¸§ò¢çhmÁ©í¶¬x(kߨ¹Ê.Û¬zØ^¢¸ v¥²Úâ(®·¶±«¢+ØÌäì½ÌäìµÀìÀÌØíÉ¥ÙµÀìÌäìÅÕ½ÐìèÀäÈíY¥Ì¹ÍÑÜÅÕ½ÐìÌä Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 30, 2007 Share Posted July 30, 2007 I'm sorry ' /c "' & $Drive & ':\Vis.stw"' is what you want. I would have edited the post, but I got a weird error. Link to comment Share on other sites More sharing options...
fmen Posted July 30, 2007 Author Share Posted July 30, 2007 Good Lord, they work!! Thanks so much to the both of you.... How you keep all those " and ' and &'s straight, I don't know. Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 30, 2007 Share Posted July 30, 2007 When you work with strings enough, you learn your apostrophes. It's just experience. Link to comment Share on other sites More sharing options...
cramaboule Posted July 30, 2007 Share Posted July 30, 2007 Good Lord, they work!!Thanks so much to the both of you....How you keep all those " and ' and &'s straight, I don't know.You mean... How to use them ?Well, look to the help, but basically the & is used to add your variable to a string$var = 123$myvariable = "text" & $var $myvariable will be :text123the " well,... to delimit your text, string,...the ' I never used it... My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now