Jump to content

noobie question


Recommended Posts

You could put it in the script itself.

You mean have a seperate script for the msgbox and then execute that script from in my main script when i need the msgbox?

As to /AU3ExecuteLine what the heck is that?

Link to comment
Share on other sites

Its a command like parameter for AutoIt. To generate a message and still keep the script unpaused, and, keep it there until the user says close, use this:

Run(@ScriptFullPath & ' /AutoIt3ExecuteLine "MsgBox(0, ''Hello World!'', ''Hi!'')"')

Link to comment
Share on other sites

Its a command like parameter for AutoIt. To generate a message and still keep the script unpaused, and, keep it there until the user says close, use this:

Run(@ScriptFullPath & ' /AutoIt3ExecuteLine "MsgBox(0, ''Hello World!'', ''Hi!'')"')

You can use the AutoIt exe, or your own compiled ones as well. Check here for more explanation on the topic here: http://dundats.mvps.org/AutoIt/AutoIt3_Web...htm#CommandLine
Link to comment
Share on other sites

I just had to change it a bit to work: Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(0, ''Hello World!'', ''Hi!'')"')

Should it have worked with the fullscriptpath one? Because it did not for me, but searching for it in the helpfile had the example using @AutoItExe so I tried that and it worked.

Link to comment
Share on other sites

If It's compiled then the @ScriptFullPath would work!

no i just made a new script and pasted that in and i ran the script. It didn't work so i looked at the help file and used what was in there. hmm maybe i needed to include something for it to work, I'm not sure.

I'm still confused however as to which way i use if i'm going to compile the script so it will work for people who don't have autoit installed.

Edit: so if i had compiled it it should have worked? That doesn't help me much because i want it to be able to run whether its compiled or not since i prefer to run my scripts uncompiled (heard from somewhere they run better that way) but mostly i run them uncompiled because I'm always changing them and fixing stuff.

This also brings up another question i have. Is there any way to run two loops simultaneously in one script? Or to do that do i have to run two scripts?

Edited by Mixam
Link to comment
Share on other sites

Another method, useful when you are testing is like follows:

If @Compiled Then

Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(0, ''Hello World!'', ''Hi!'')"')

Else

Run(@ScriptFullPath & ' /AutoIt3ExecuteLine "MsgBox(0, ''Hello World!'', ''Hi!'')"')

EndIf

Link to comment
Share on other sites

I just used this method and it works uncompiled, then i compiled it and it still works:

Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(0, ''Hello World!'', ''Hi!'')"')

However is that only because I have autoit installed?

Also please see my edit in last post.

Thanks for all your help guys.

Link to comment
Share on other sites

I just used this method and it works uncompiled, then i compiled it and it still works:

Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(0, ''Hello World!'', ''Hi!'')"')

However is that only because I have autoit installed?

Also please see my edit in last post.

Thanks for all your help guys.

Yes.
Link to comment
Share on other sites

I just used this method and it works uncompiled, then i compiled it and it still works:

Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(0, ''Hello World!'', ''Hi!'')"')

However is that only because I have autoit installed?

Also please see my edit in last post.

Thanks for all your help guys.

No. Once you compile your script, any code called with /AutoIt3ExecuteLine will work anywhere.

Link to comment
Share on other sites

Ok so I am just going to leave it the way i have it then and hope it works :)

So is there a way to have two simultaneous loops running in one script, or will I need to put one loop in another script and then run that script from in the first script?

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