BadBoyDeGekste Posted February 27, 2008 Share Posted February 27, 2008 (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 February 27, 2008 by BadBoyDeGekste Link to comment Share on other sites More sharing options...
Kerros Posted February 27, 2008 Share Posted February 27, 2008 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. Link to comment Share on other sites More sharing options...
BadBoyDeGekste Posted February 27, 2008 Author Share Posted February 27, 2008 oke now I start it and it closes right away Link to comment Share on other sites More sharing options...
weaponx Posted February 27, 2008 Share Posted February 27, 2008 You don't actually put the brackets in function calls, they are just there to show what is optional... Link to comment Share on other sites More sharing options...
BadBoyDeGekste Posted February 27, 2008 Author Share Posted February 27, 2008 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 -.- Link to comment Share on other sites More sharing options...
weaponx Posted February 27, 2008 Share Posted February 27, 2008 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) Link to comment Share on other sites More sharing options...
BadBoyDeGekste Posted February 27, 2008 Author Share Posted February 27, 2008 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 -.- Link to comment Share on other sites More sharing options...
weaponx Posted February 27, 2008 Share Posted February 27, 2008 alright thanksbut 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.htmWRONG:Func;do stuffEndFuncCORRECT:myFunction()Func myFunction();do stuffEndFunc Link to comment Share on other sites More sharing options...
BadBoyDeGekste Posted February 27, 2008 Author Share Posted February 27, 2008 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.htmWRONG:Func;do stuffEndFuncCORRECT:myFunction()Func myFunction();do stuffEndFuncI 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 -.- Link to comment Share on other sites More sharing options...
DjDeep00 Posted February 27, 2008 Share Posted February 27, 2008 @BadBoyDeGekste...Please post your script (Wrap it in code tags) Link to comment Share on other sites More sharing options...
BadBoyDeGekste Posted February 27, 2008 Author Share Posted February 27, 2008 @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? Link to comment Share on other sites More sharing options...
Kerros Posted February 27, 2008 Share Posted February 27, 2008 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. Link to comment Share on other sites More sharing options...
BadBoyDeGekste Posted February 27, 2008 Author Share Posted February 27, 2008 oke now it actually does something it go's to my upper left corner and clicks left mouse button once and exit's again :| Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now