Sign in to follow this  
Followers 0
Jono

tickbox, #include, Repeat some scripts, Not all?

3 posts in this topic

How can I create a Tickbox that you can choose which #include scripts to activate, and which ones not to include?

Also is there a way to choose certain scripts to repeat a certain number of times, while others only run through once?

Tickbox is the main thing tho.

Example:

1. There are 5 tickboxes on the 1 menu.

2. Tickbox number 1, activates Number1.au3

3. Tickbox number 2, activates Number2.au3, and so on, until Number5.au3.

4. I decide to disable Number3.au3, By unticking the box, But I still tick all the rest. So the autoit file runs all the Scripts, 1, 2, 4, and 5, and skips 3.

Does anyone know how to do this with #include code??

Thanks in advance! :)

Share this post


Link to post
Share on other sites



Include files usually contain Functions , therefore, you can create a checkbox with GuiCtrlCreateCheckBox and make a loop checking if a box is ticked, call a function you desired.

Share this post


Link to post
Share on other sites

How can I create a Tickbox that you can choose which #include scripts to activate, and which ones not to include?

Also is there a way to choose certain scripts to repeat a certain number of times, while others only run through once?

Tickbox is the main thing tho.

Example:

1. There are 5 tickboxes on the 1 menu.

2. Tickbox number 1, activates Number1.au3

3. Tickbox number 2, activates Number2.au3, and so on, until Number5.au3.

4. I decide to disable Number3.au3, By unticking the box, But I still tick all the rest. So the autoit file runs all the Scripts, 1, 2, 4, and 5, and skips 3.

Does anyone know how to do this with #include code??

Thanks in advance! :o

Include is not conditional. Every valid #include statement will be applied at compile time.

As xVivoCity pointed out, you can easily configure to only run certain functions, but the #include of unused stuff will still happen. Just as though you put #include <IE.au3> at the top of your script, but then never called any _IE* functions. It will fatten your compiled script, but not hurt anything.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  
Followers 0