Jump to content

Recommended Posts

Posted

Yes i am a newbie..

In v2 i was able to make a program run, and add properties to a program as well. For instance, if i was to run the shortcut to my game.. say.. Diablo II, in the properties of this shortcut i would put -w to run the game in a window instead of having it run fullscreen.

Anyways first off, i made a .ini file. One variable would be a path/directory:

path=C:\Program Files\Game.exe

Now, at the beginning of the .au3 file, i have an ini read that works properly:

$path=IniRead("configurations.ini","Account","path","default")

Ok, so next, in the .au3 file, i want to run this game.exe program from the variable $path. So people who want this program can configure it to their likings depending on where they installed the game into their computers. Now i have tried this and tried putting in quotes, slashes, you name it to fix the problem and nothing works. It currently looks like this:

Run("$path\Game.exe", "", @SW_MINIMIZE)

And it keeps giving me errors, does anyone know how to fix this?

Posted

Variable names do not go in quotes. Use & to join variables and strings.

Run($path & "\Game.exe")

There is one catch: If your path name contains spaces, you may need to surround the entire file/path in quotation marks. To represent a quotation mark you can use either '"' or """".

Run('"' & $path & "\Game.exe" & '"')

or

Run("""" & $path & "\Game.exe" & """")

Hope that helps

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

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
  • Recently Browsing   0 members

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