Sign in to follow this  
Followers 0
Guest BlackDiablo110

Starting Program

7 posts in this topic

Hey, last night I accomplished some pretty cool stuff with AutoIt for my first day. Anyways, I was looking at the window functions in the Help File. I tried WinActivate, then I used the "shortcut to starcraft" *that is case sensitive just to let you know* but it didn't open up the starcraft window. Then what I did next was I started starcraft, then minimized it, then re-compiled the script, and THEN it opened it. My problem is, I don't want to open a minimized program, I want to open it up completely. Thanks.

Share this post


Link to post
Share on other sites



Thanks a lot. Just wondering though, how would it look to open up like a notepad file saved to the desktop or something? And just for show, woulld it be possible to make a script that starts notepad, types out another script with Send command, then saves it as a .au3 file, then opens autoit folder, then compiles that newly made file? If so that would be pretty damn cool, just got the idea heh.

Share this post


Link to post
Share on other sites

Oh, I just tried what you said, but it gave me an error, any ideas?

Run(""C:\Program Files\Starcraft\starcraft.exe"",""C:\Program Files\Starcraft"")

WinWaitClose("Brood War", "", 20)

WinKill("Brood War", "")

This is just to see if it works, which it didn't =/.

Share this post


Link to post
Share on other sites

Thanks again Larry, I wasn't even paying attention to the quotes.

Share this post


Link to post
Share on other sites

Oh, just to add. I just downloaded and installed AutoIt vs 2. I'm gonna try that first, thanks to whoever suggested it.

Share this post


Link to post
Share on other sites

Oh, I just tried what you said, but it gave me an error, any ideas?

Run(""C:\Program Files\Starcraft\starcraft.exe"",""C:\Program Files\Starcraft"")

WinWaitClose("Brood War", "", 20)

WinKill("Brood War", "")

This is just to see if it works, which it didn't =/.

<{POST_SNAPBACK}>

If you want to run an executable, you don't have to use double quotes.

Use it like this:

Run("C:\Program Files\Starcraft\starcraft.exe", "C:\Program Files\Starcraft")

Share this post


Link to post
Share on other sites

Thanks a lot. Just wondering though, how would it look to open up like a notepad file saved to the desktop or something? And just for show, woulld it be possible to make a script that starts notepad, types out another script with Send command, then saves it as a .au3 file, then opens autoit folder, then compiles that newly made file? If so that would be pretty damn cool, just got the idea heh.

For an example on how to have your autoit script generate another script check out my executable wrapper here. This uses the concept to create a wrapper application that executes the wrapped main program. Check it out and lemme know if there is anything I can do to help.

*** Matt @ MPCS

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