Sign in to follow this  
Followers 0
lyly

run

9 posts in this topic

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

Share this post


Link to post
Share on other sites



Is your script in the "installs" folder?

Run('"' & @MyDocumentsDir & '\installs\winzip90.exe"')
Could always do that too I guess.

[center]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.[/center]

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Thanks

I understand you

ly

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by SpongeDoc

Share this post


Link to post
Share on other sites

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 -> Datatypes

StringsStrings 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]

Share this post


Link to post
Share on other sites

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.

:D

Share this post


Link to post
Share on other sites

Thanks all of you!

I need some training in programming :D

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0