Jump to content

Newby Questions


Newby
 Share

Recommended Posts

So I have 2 questions:

1.I wrote this script :

$var = IniRead("Botsets.ini", "Pfad", "WBC_Pfad", "C:\Programme\Enlight\Infinite Interactive\Warlords Battlecry III\battlecry3.exe")

;but I don't know how to start this ^^ Prog. now

SoundSetWaveVolume(100)

SoundPlay( "Headshot.wav" ,1)

2.how can I create a Logfile????

Link to comment
Share on other sites

So I have 2 questions:

1.I wrote this script :

$var = IniRead("Botsets.ini", "Pfad", "WBC_Pfad", "C:\Programme\Enlight\Infinite Interactive\Warlords Battlecry III\battlecry3.exe")

;but I don't know how to start this ^^ Prog. now

SoundSetWaveVolume(100)

SoundPlay( "Headshot.wav" ,1)

2.how can I create a Logfile????

<{POST_SNAPBACK}>

1: run

2: filewriteline

"I'm not even supposed to be here today!" -Dante (Hicks)

Link to comment
Share on other sites

But if I make

Run($var)

This Error comes: AutoIt Error

             

                            Line 38

                            run($var)

                            Error:Unable to execute the external Programm

<{POST_SNAPBACK}>

try this:
Run('"' & $var & '"')

that'll put quotes around the run line, which helps when there's spaces or symbols like & in the path....

Edited by emmanuel

"I'm not even supposed to be here today!" -Dante (Hicks)

Link to comment
Share on other sites

Try

If FileExists($var) Then
   Run($Var)
Else
   MsgBox(16,'Error...','Check your .ini file' & @lf & @lf & $var & ' doesn't seems to exist.')
EndIf

<{POST_SNAPBACK}>

Good idea, though Run seems to be unique within autoit as sometimes having issues with spaces, so even if the fileexists, you still might want to have the quotes coconated around the $var...

"I'm not even supposed to be here today!" -Dante (Hicks)

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