Jump to content

help please


razo
 Share

Recommended Posts

hello making a script to launch a game at a certain time, my previous version worked however i noticed that sometimes my computer would fail to launch it the first time so i needed to add a way of checking if its working and now I've got errors that i just cant solve.. any help would be appreciated

the errors:

>C:\Program Files (x86)\AutoIt3\SciTE\..\au3check.exe "C:\Users\user\Desktop\script.au3"

AutoIt3 Syntax Checker v1.54.8 Copyright © Tylo 2007

C:\Users\user\Desktop\script.au3(15,18) : ERROR: syntax error

If ProcessExists ExeFile

~~~~~~~~~~~~~~~~~^

C:\Users\user\Desktop\script.au3(15,29) : ERROR: Object method or attribute accessed without 'With'

If ProcessExists ExeFile.exe

~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Users\user\Desktop\script.au3(15,29) : ERROR: single line 'If' missing 'Then'.

If ProcessExists ExeFile.exe

~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Users\user\Desktop\script.au3(17,1) : ERROR: missing Wend.

ElseIf

^

C:\Users\user\Desktop\script.au3(12,1) : REF: missing Wend.

While

^

C:\Users\user\Desktop\script.au3(17,1) : ERROR: syntax error

ElseIf

^

C:\Users\user\Desktop\script.au3 - 5 error(s), 0 warning(s)

>Exit code: 2 Time: 0.210

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The code:

$hour = 7

$min = 00

$start = $hour & ":" & $min ; for testing

$program = "c:\users\user\desktop\launch.bat"

$loop = 1

While $loop = 1

$start2 = @HOUR & ":" & @MIN

If ProcessExists ExeFile.exe

msgbox (1, "checker", "Eve Already Running")

ElseIf $start = $start2

Run($program)

ProcessWait ("exefile.exe",5)

if ProcessExists ("ExeFile.exe")

$loop = 2

endif

EndIf

EndIf

sleep(2000)

Exit

WEnd

+++++++++++++++++++++++++++++++++++++++++++++++++

Link to comment
Share on other sites

You were so close there, I almost wish you had gotten away with it.

Tell you what, I'll give you a clue. start from the top down as a lot of the lower errors are cause by the top erors.

Look at you missing ()s and bang a couple of thens in there.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Hard to say, there's so many good ones. Maybe Benjamin Sisko, the whole "captain of Terok Nor" -thing he does is kinda cool :graduated:

Fry (<-- link) is good too.

Link to comment
Share on other sites

unfortunately the script seems to close itself now shortly after starting.. tried some revisions still same results.. no errors just a loop that doesn't loop

this code is not as tidy as the last but, im a bit lost as to why the loop stops without launching the program.

_---- nvrmind, simple mistake lol.. i think i need my eyes examined.. had the exit before the wend..

Edited by razo
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...