Oxin8 1 Posted September 7, 2004 I recently made a script to automates the playing of a game but it needs to run faster. any tips will help. for example: is it faster to do this if $x = 1 and $a = 3 then do watever or is it faster to do if $x = 1 then if $a = 3 then do watever endif even little things will help. also, does the script run slower if i have unused functions? thx in advance. ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Share this post Link to post Share on other sites
ezzetabi 3 Posted September 7, 2004 (edited) AFAIK and functions are faster than If functions so the first choice is better. A script don't run slower if it has unused functions. Since their code is never executed, if you want to be even surer. Put a exit before the Func section: Main script: Exit Func 1() EndFunc Func2() EndFunc Edited September 7, 2004 by ezzetabi Share this post Link to post Share on other sites
Oxin8 1 Posted September 7, 2004 what's AFAIK? in my script i compare quite a few things. i'm leaning towards select cases instead of if statements. any general tips to speed the script up? ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Share this post Link to post Share on other sites
Jos 2,165 Posted September 7, 2004 what's AFAIK? in my script i compare quite a few things. i'm leaning towards select cases instead of if statements. any general tips to speed the script up? <{POST_SNAPBACK}>As Far As I Know... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites