Jump to content

Recommended Posts

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
Posted

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.

Posted

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)

Posted

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

Posted

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

Posted

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

Posted

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.

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
×
×
  • Create New...