herworth Posted February 3, 2004 Posted February 3, 2004 When I use a variable as a filename eg $file = FileSaveDialog(etc ..) I can't get it to open because I can't get the quotes right. Runwait('"zipgenius.exe" "example.zip"') is OK but Runwait("Zipgenius.exe " & $file) is not. Any thoughts? Thanks in advance Peter [u][font="Arial"]Pete[/font][/u]
Developers Jos Posted February 3, 2004 Developers Posted February 3, 2004 (edited) Peter, you can try it this way: Runwait('Zipgenius.exe "' & $file & '"') this will put " arround your parameters... or Runwait('"Zipgenius.exe ' & $file & '"') will put " arround the whole command.... Edited February 3, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
trids Posted February 3, 2004 Posted February 3, 2004 Try ..;Nesting (") within (')Runwait('Zipgenius.exe "' & $file & '"') ;Nesting ("") within (")Runwait("Zipgenius.exe """ & $file & """")
herworth Posted February 3, 2004 Author Posted February 3, 2004 Thanks to both of you. I thought I'd tried every combination of quotes but Runwait("zip """ & $file & """") worked. Peter [u][font="Arial"]Pete[/font][/u]
Neoborn Posted March 20, 2005 Posted March 20, 2005 Run("DCPlusPlus.exe", @ProgramsDir & '"\Xrc Connect\Xrc Connect 6a11"',) Can anyone tell me why this won't work? ~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT
MHz Posted March 20, 2005 Posted March 20, 2005 Run("DCPlusPlus.exe", @ProgramsDir & '"\Xrc Connect\Xrc Connect 6a11"',) Can anyone tell me why this won't work?<{POST_SNAPBACK}>The last comma should not be in the function. This will only produce error.
SlimShady Posted March 21, 2005 Posted March 21, 2005 (edited) And if the executable is not in your PATH environment variable, you need to specify the full path. If NewSettings.reg is in C:\utilities, this will work: Run('REGEDIT.EXE /S NewSettings.reg', 'C:\utilities') This won't work without changing the PATH environment variable: Run('AutoIt3.exe Test.au3', 'C:\Program Files\AutoIt3') So, to prevent problems it's better to use the full path. Like this: Run('C:\Program Files\AutoIt3\AutoIt3.exe Test.au3', 'C:\scripts') or this: Run('C:\Program Files\AutoIt3\AutoIt3.exe C:\scripts\Test.au3') Edited March 21, 2005 by SlimShady
Neoborn Posted March 22, 2005 Posted March 22, 2005 Thank you for replying. Can you fix this to what it should be to give me a solid guide?: D:\Program Files\Xrc Connect\Xrc Connect 6a11\DCPlusPlus.exe Thanks in advance ~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT
SlimShady Posted March 22, 2005 Posted March 22, 2005 (edited) RunWait('D:\Program Files\Xrc Connect\Xrc Connect 6a11\DCPlusPlus.exe') Edited March 22, 2005 by SlimShady
Neoborn Posted March 22, 2005 Posted March 22, 2005 dude you rock. What about the other one then? How would you make Run("DCPlusPlus.exe", @ProgramsDir & '"\Xrc Connect\Xrc Connect 6a11"',) work, if RunWait('D:\Program Files\Xrc Connect\Xrc Connect 6a11\DCPlusPlus.exe', "", @SW_MAXIMIZE) does? Man I suck at the engleesh langwidch sum tymes. ~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT
SlimShady Posted March 22, 2005 Posted March 22, 2005 This is just because I can't sleep. Run(@ProgramFilesDir & "\Xrc Connect\Xrc Connect 6a11\DCPlusPlus.exe") Now learn the AutoIt language or get the f___ outta here.
Neoborn Posted March 22, 2005 Posted March 22, 2005 This is just because I can't sleep.Run(@ProgramFilesDir & "\Xrc Connect\Xrc Connect 6a11\DCPlusPlus.exe")Now learn the AutoIt language or get the f___ outta here.<{POST_SNAPBACK}>What do you think you have been helping me do? Before I have ever asked a question I have read the help file and tried to do it on my own. Dude if you don't want to help then please don't! Only happy helpers need apply! ~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT
MHz Posted March 22, 2005 Posted March 22, 2005 Run("DCPlusPlus.exe", @ProgramsDir & '"\Xrc Connect\Xrc Connect 6a11"') Forget the working directory, for now. Does Run("DCPlusPlus.exe") work ? Unless it is in the same directory, or a system path, like system32 folder, then it will fail. Same as running a command from a dos box or run window. But if you give a full address to it's whereabouts, then it will work. But another problem maybe that it will execute through Run(), but the executable may need a working folder, to see the support files, that it will work with. So then, a working directory is added.What does this mean?The Working Directory parameter in Run(), is NO substitute for the full address being needed.
Neoborn Posted March 22, 2005 Posted March 22, 2005 Thank you as well MHZ. ~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT
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