Sign in to follow this  
Followers 0
BadBoyDeGekste

Errors !

13 posts in this topic

#1 ·  Posted (edited)

Func junk()
$lol = PixelGetColor ( 400 , 700 )
$lol1 = PixelGetColor ( 434 , 146 )

if $lol = 0x37375F and $lol1 = 0xAE4040 then MouseClick ( "left" , 400 , 700 , 1 , 0  )
    
EndFunc
Func crap()
$hihi = PixelGetColor ( 225/315 , 300/385 )
    
If $hihi = 0x000000 then MouseClick ( "left" , 225/315 , 300/385 , 1 , 250  )
EndFunc

I don't get it lol how can I get this to work?

I keep getting errors

badly formatted func statement?

anyone please ^

Edited by BadBoyDeGekste

Share this post


Link to post
Share on other sites



needs to be Func "name of function"()

IE:

Func Junk()

endfunc


Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Share this post


Link to post
Share on other sites

oke now I start it and it closes right away ;):)

Share this post


Link to post
Share on other sites

You don't actually put the brackets in function calls, they are just there to show what is optional...

Share this post


Link to post
Share on other sites

You don't actually put the brackets in function calls, they are just there to show what is optional...

I don't understand what you mean -.-

Share this post


Link to post
Share on other sites

I don't understand what you mean -.-

Like I said, you can't have brackets in your function calls...

WRONG:

MouseClick ( "left" [, 400 , 700 [, 1 [, 0 ]]] )

CORRECT:

MouseClick ( "left" , 400 , 700 , 1, 0)

Share this post


Link to post
Share on other sites

Like I said, you can't have brackets in your function calls...

WRONG:

MouseClick ( "left" [, 400 , 700 [, 1 [, 0 ]]] )

CORRECT:

MouseClick ( "left" , 400 , 700 , 1, 0)

alright thanks

but its still not doing anything :)

it opens and closes at the same time -.-

Share this post


Link to post
Share on other sites

alright thanks

but its still not doing anything :)

it opens and closes at the same time -.-

Everything is wrong...you can't just create functions without naming them, and you aren't calling them either. Read the help file...

http://www.autoitscript.com/autoit3/docs/i...g_functions.htm

WRONG:

Func

;do stuff

EndFunc

CORRECT:

myFunction()

Func myFunction()

;do stuff

EndFunc

Share this post


Link to post
Share on other sites

Everything is wrong...you can't just create functions without naming them, and you aren't calling them either. Read the help file...

http://www.autoitscript.com/autoit3/docs/i...g_functions.htm

WRONG:

Func

;do stuff

EndFunc

CORRECT:

myFunction()

Func myFunction()

;do stuff

EndFunc

I have that ofc but didn't edit it in my first post -.-

if I didn't had function calls I would get an error but I don't get an error it opens and closes again -.-

Share this post


Link to post
Share on other sites

@BadBoyDeGekste...Please post your script (Wrap it in code tags)

Share this post


Link to post
Share on other sites

@BadBoyDeGekste...Please post your script (Wrap it in code tags)

I am really new to this -.-

Func junk()
$lol = PixelGetColor ( 400 , 700 )
$lol1 = PixelGetColor ( 434 , 146 )

if $lol = 0x37375F and $lol1 = 0xAE4040 then MouseClick ( "left" , 400 , 700 , 1 , 0  )
    
EndFunc
Func crap()
$hihi = PixelGetColor ( 225/315 , 300/385 )
    
If $hihi = 0x000000 then MouseClick ( "left" , 225/315 , 300/385 , 1 , 250  )
EndFunc

thats all I got lol -.-

should there be more?

Share this post


Link to post
Share on other sites

this script is not going to do anything, as the functions are never being called.

Check the help file on functions.

or just remove the function tags from your code to get it to do something.

$lol = PixelGetColor ( 400 , 700 )
$lol1 = PixelGetColor ( 434 , 146 )

if $lol = 0x37375F and $lol1 = 0xAE4040 then MouseClick ( "left" , 400 , 700 , 1 , 0  )
    
$hihi = PixelGetColor ( 225/315 , 300/385 )
    
If $hihi = 0x000000 then MouseClick ( "left" , 225/315 , 300/385 , 1 , 250  )

Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Share this post


Link to post
Share on other sites

oke now it actually does something

it go's to my upper left corner and clicks left mouse button once and exit's again :|

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