Jump to content
Sign in to follow this  
TimothyMagnaflow

RunWait #3.240 Sytnax

Recommended Posts

Hi Everyone

I am having a trouble to convert the AutoIt 2.XX script to AutoIt 3.XX.

AutoIt 2.xx Example

Runwait, C:\\Program Files\\EDI Complete\\EDI.exe "/job: Inbound job", C:\\Program Files\\EDI Complete

Please let me know how can I put the parameter"/Job: Inbound job" after the program directory path.

Thank you

Timothy Tse

Share this post


Link to post
Share on other sites

Hi Everyone

I am having a trouble to convert the AutoIt 2.XX script to AutoIt 3.XX.

AutoIt 2.xx Example

Runwait, C:\\Program Files\\EDI Complete\\EDI.exe "/job: Inbound job", C:\\Program Files\\EDI Complete

Please let me know how can I put the parameter"/Job: Inbound job" after the program directory path.

Thank you

Timothy Tse

For basic conversions, you should be able to use the "v2 to v3 Converter" in Start -> Programs -> AutoIt v3 -> Extras

With such, your line above would be converted to:

RunWait ( 'C:\Program Files\EDI Complete\EDI.exe "/job: Inbound job"', 'C:\Program Files\EDI Complete' )

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites

Thank YOU Monamo

But Below is the examples from the Online Help Documentation.

How come it use double quote on each parameters? Would you mind to explain to me how come there is different syntax which is not work in my case?

RunWait ( "filename" [, "workingdir" [, flag]] )

$val = RunWait("Notepad.exe", @WindowsDir, @SW_MAXIMIZE)

; script waits until Notepad closes

MsgBox(0, "Program returned with exit code:", $val)

For basic conversions, you should be able to use the "v2 to v3 Converter" in Start -> Programs -> AutoIt v3 -> Extras

With such, your line above would be converted to:

RunWait ( 'C:\Program Files\EDI Complete\EDI.exe "/job: Inbound job"', 'C:\Program Files\EDI Complete' )
Edited by TimothyMagnaflow

Share this post


Link to post
Share on other sites

Thank YOU Monamo

But Below is the examples from the Online Help Documentation.

How come it use double quote on each parameters? Would you mind to explain to me how come there is different syntax which is not work in my case?

RunWait ( "filename" [, "workingdir" [, flag]] )

$val = RunWait("Notepad.exe", @WindowsDir, @SW_MAXIMIZE)

; script waits until Notepad closes

MsgBox(0, "Program returned with exit code:", $val)

I can't remember where it's precisely mentioned, but basically it comes down to something like this...

When entering in the parameters for a function, it is acceptable to use either single quotation marks (') or double quotation mark ("), provided that you use a matching form (single or double) to both start and end the parameter entry. When mixed as in the example I gave you, the outer quotes (single) are used to enclose the parameter, and the inner quotes (double) are handled as part of the string. I did it that way because I assumed that the program (EDI.exe) you were running would require the /job portion to be inside quotes when executed.

There are other variations that could have been used as well, but this was just the shortest way to handle it based upon the line you wanted to execute.


- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

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  

×
×
  • Create New...