Jump to content

Starting Program


Guest BlackDiablo110
 Share

Recommended Posts

Guest BlackDiablo110

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.

Link to comment
Share on other sites

Guest BlackDiablo110

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.

Link to comment
Share on other sites

Guest BlackDiablo110

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

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

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