Its_me_again Posted January 2, 2006 Share Posted January 2, 2006 Hi, I've made a GUI to extract rar-archves using UnRAR.exe, this is a commandline program to extract rar's. Anyways I'm running it like this: Run("unrar.exe x " & $file, "", @SW_HIDE) and it works fine when $file = C:\folder\rar.rar, but when $file = C:\folder with spaces\rar.rar it doesn't works anymore, it needs " then. So the line would be: UnRAR.exe x "C:\folder with spaces\rar.rar", what I wanna know is how I get those " around my var $file. Thanks in advance. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 2, 2006 Moderators Share Posted January 2, 2006 '"' & $file & '"' is that what your asking? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Its_me_again Posted January 2, 2006 Author Share Posted January 2, 2006 '"' & $file & '"' is that what your asking?Hmm, that should return unrar.exe x "C:\Documents and Settings\Administrator\Bureaublad\rar.rar", right? But somehow it doesn't :s Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 2, 2006 Moderators Share Posted January 2, 2006 Well, you could always test that theory like this: $file = "C:\Documents and Settings\Administrator\Bureaublad\rar.rar" MsgBox(0, "Test", '"' & $file & '"') But onto your code... if you don't mind me asking (keep in mind I think I suck at Run commands, so this is an attempt to help at best)... is the 'x' the drive? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Its_me_again Posted January 2, 2006 Author Share Posted January 2, 2006 Well, you could always test that theory like this: $file = "C:\Documents and Settings\Administrator\Bureaublad\rar.rar" MsgBox(0, "Test", '"' & $file & '"') But onto your code... if you don't mind me asking (keep in mind I think I suck at Run commands, so this is an attempt to help at best)... is the 'x' the drive? No x is a command "x Extract files with full path", but what you said before does works, sorry. made a mistake somewhere else, thanks for the help. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 2, 2006 Moderators Share Posted January 2, 2006 Good Deal! , because I was butchering it here just trying to figure it out without the program . Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Its_me_again Posted January 2, 2006 Author Share Posted January 2, 2006 Good Deal! , because I was butchering it here just trying to figure it out without the program .I tested it like this: $file = "C:\Documents and Settings\Administrator\Bureaublad\rar.rar" Run("unrar.exe x " & '"' & $file & '"', "", @SW_HIDE) And it works, but I still can't find the mistake in the GUI... Link to comment Share on other sites More sharing options...
BigDod Posted January 2, 2006 Share Posted January 2, 2006 I tested it like this: $file = "C:\Documents and Settings\Administrator\Bureaublad\rar.rar" Run("unrar.exe x " & '"' & $file & '"', "", @SW_HIDE) And it works, but I still can't find the mistake in the GUI...You are going to have to post your GUI code if you want someone to help with it. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother 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