Jump to content
tonycst

How to NOT run #included script ?

Recommended Posts

tonycst

I am including other script files into my main script.

The Included script is programmed to (just run)

This is the main script.

#include <includedscript.au3>
;conde continues

This is included script.

If $UseTrial = False Then 
    Return
Else
    MsgBox (0,'','it ran, darn it')
    ;code continues
Endif

Literally all i want is to prevent script from being #included based on a variable.
If $Var=True Then #include

 

Is that possible or do i have to go into my included script and wrap it in one giant function ?

Share this post


Link to post
Share on other sites
jdelaney

I suppose you can compile them separately and only logically call the other exe (fileinstall to copy it).  your other option is valid too, make it all a function, or wrap the entirety in an if statement. There is no logic to include or not include. It's all or nothing.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
tonycst

yeah.

I ended up doing just that. Wraped most of it as a function.
Didnt think compiler would do that for me.

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

×