lyly Posted July 4, 2006 Share Posted July 4, 2006 Hello I'm new to AutoIt,Please help. Why this does NOT run: run("winzip90.exe", "C:\Documents and Settings\ly\MyDocuments\installs") and this runs OK run("C:\Documents and Settings\ly\MyDocuments\installs\winzip90.exe") thanks ly Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 4, 2006 Moderators Share Posted July 4, 2006 Is your script in the "installs" folder? Run('"' & @MyDocumentsDir & '\installs\winzip90.exe"')Could always do that too I guess. 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...
Briegel Posted July 4, 2006 Share Posted July 4, 2006 You want to run the "winzip90.exe" which is not in any %path%. The exe is in C:\Documents and Settings\ly\MyDocuments\installs". Run ( "filename" , "workingdir" ) Workingdir means not that you can find the exe there. Sory I can't explain it better in english. Link to comment Share on other sites More sharing options...
lyly Posted July 4, 2006 Author Share Posted July 4, 2006 Is your script in the "installs" folder? Run('"' & @MyDocumentsDir & '\installs\winzip90.exe"')Could always do that too I guess. No, it is in another folder: C:\scripts ly Link to comment Share on other sites More sharing options...
lyly Posted July 4, 2006 Author Share Posted July 4, 2006 You want to run the "winzip90.exe" which is not in any %path%. The exe is in C:\Documents and Settings\ly\MyDocuments\installs".Run ( "filename" , "workingdir" )Workingdir means not that you can find the exe there.Sory I can't explain it better in english.ThanksI understand youly Link to comment Share on other sites More sharing options...
SpongeDoc Posted July 8, 2006 Share Posted July 8, 2006 (edited) Hy! I search the perfect code, to run my script from a cd, to any computer. I found it here, and this form is working: Run('"' & @WorkingDir & '\install\wrar300hu.exe"') But I don't understand the ', and " mark function in the code, and i don't know how it's work? I try search in the help file, but only find the & mark (operator). Can you tell me how i'ts work? Edited July 8, 2006 by SpongeDoc Link to comment Share on other sites More sharing options...
Skruge Posted July 8, 2006 Share Posted July 8, 2006 But I don't understand the ', and " mark function in the code, and i don't know how it's work?I try search in the help file, but only find the & mark (operator).Can you tell me how i'ts work?From the AutoIt Help file under Language Reference -> DatatypesStringsStrings are enclosed in double-quotes like "this". If you want a string actually contain a double-quote use it twice like: "here is a ""double-quote"" - ok?" You can also use single-quotes like 'this' and 'here is a ' 'single-quote' ' - ok?' You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want. For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them: 'This "sentence" contains "lots" of "double-quotes" does it not?' is much simpler than: "This ""sentence"" contains ""lots"" of ""double-quotes"" does it not?" [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
MHz Posted July 9, 2006 Share Posted July 9, 2006 Hy! I search the perfect code, to run my script from a cd, to any computer. I found it here, and this form is working: Run('"' & @WorkingDir & '\install\wrar300hu.exe"') But I don't understand the ', and " mark function in the code, and i don't know how it's work? I try search in the help file, but only find the & mark (operator). Can you tell me how i'ts work?If your intention for @WorkingDir to be the path to your script directory, then @ScriptDir maybe more suitable to use. Run('"' & @ScriptDir & '\install\wrar300hu.exe"') as @WorkingDir is not a constant. Link to comment Share on other sites More sharing options...
SpongeDoc Posted July 9, 2006 Share Posted July 9, 2006 Thanks all of you! I need some training in programming 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