Jump to content
Sign in to follow this  

Getting the script to run faster

Recommended Posts

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

even little things will help. also, does the script run slower if i have unused functions? thx in advance.

Share this post

Link to post
Share on other sites

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:


Func 1()




Edited by ezzetabi

Share this post

Link to post
Share on other sites

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?


As Far As I Know... :ph34r:

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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...