Sign in to follow this  
Followers 0
razo

help please

12 posts in this topic

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

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

Share this post


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

Share this post


Link to post
Share on other sites

Just a little trick here....

If you double click on a line like this

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

the line the error is on will be highlighted

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

LOL, thanks guys got it fixed.

Share this post


Link to post
Share on other sites

I think JohnOne should be president or something.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

...some star trek character, haven't decided which one yet.

Edit: Waaaait some more. Who would you like to be?

Edited by trancexx

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

This thread just barely escaped the "Game Automation" police - lucky OP

I don't see any point in having a MMO (EVE Online) starting at a certain time without a "follow-up" (login, botting ...)


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Not a very smart idea to continue on this thread :graduated:

It will get flagged pretty soon. You should have taken my previous post as a warning.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

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