Jump to content

run


Recommended Posts

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

  • Moderators

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

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

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

Link to comment
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?

Edited by SpongeDoc
Link to comment
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]

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...