Jump to content

Autoit script if function help


buzzman2005

Recommended Posts

Ok i have an issue for some reason when i install the drivers for my wacom tablet i sometimes get one box that only shows up occasionally.....

is there a way to use the IF statement in autoit to say for ex:

If ("information") window is present do the foloowg commands ie mouseclick or controlclick or if not present proceed to next line in script..?????

because it gets hung on this one line sometimes.... and i'm nto sure how to use the if function or if it could be used in this case.....

Link to comment
Share on other sites


Is the [ADLIB] feature available in your version of AutoIt? In version 2.64 you can tack an [ADLIB] section onto the end of a script to deal with unexpected situations like the one you described, fully documented in the help file. Good luck.

Link to comment
Share on other sites

Is the [ADLIB] feature available in your version of AutoIt? In version 2.64 you can tack an [ADLIB] section onto the end of a script to deal with unexpected situations like the one you described, fully documented in the help file. Good luck.

syntax changed a little since that

AdlibEnable

--------------------------------------------------------------------------------

Enables Adlib functionality.

AdlibEnable ( "function" [,time] )

Parameters

function The name of the adlib function to call.

time [optional] how often in milliseconds to call the function. Default is 250 ms.

Return Value

None.

Remarks

Every 250 ms (or time ms) the specified "function" is called--typically to check for unforeseen errors. For example, you could use adlib in a script which causes an error window to pop up unpredictably.

The adlib function should be kept simple as it is executed often and during this time the main script is paused. Also, the time parameter should be used carefully to avoid CPU load.

Example

AdlibEnable("myadlib")

;...

Exit

Func myadlib()

    If WinActive("Error") Then

        ;...

    EndIf

EndFunc

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...