Sign in to follow this  
Followers 0
Newby

Newby Questions

10 posts in this topic

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

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

But if I make

Run($var)

This Error comes: AutoIt Error

Line 38

run($var)

Error:Unable to execute the external Programm

Edited by Newby

Share this post


Link to post
Share on other sites

try putting a msgbox before or instead of the run command to see if $var contains correct path/filename

MsgBox(0, '', $var)

Greetings,

ZeD

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Try

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

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

but isn't there any other way???? :ph34r:

Share this post


Link to post
Share on other sites

but isn't there any other way???? :ph34r:

<{POST_SNAPBACK}>

There's just one critical error with that comment, the complete lack of context. Any other way for what?

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

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