Sign in to follow this  
Followers 0
kjcdude

#include files as functions/variables

2 posts in this topic

#1 ·  Posted (edited)

There's probably a pretty simple answer to this question...

I need to include a series of files to a single file to make it easier to edit and up keep my script.

The only problem is that as they're included, they're executed which is a problem because they all include run commands.

What i'd like to do is make each file it's own variable or function that i can call when needed from the master file instead of running at the start of the script.

I could just enter the entire include script where needed, but that just isn't practical.

Thanks

Edited by kjcdude

Share this post


Link to post
Share on other sites



There's probably a pretty simple answer to this question...

I need to include a series of files to a single file to make it easier to edit and up keep my script.

The only problem is that as they're included, they're executed which is a problem because they all include run commands.

What i'd like to do is make each file it's own variable or function that i can call when needed from the master file instead of running at the start of the script.

I could just enter the entire include script where needed, but that just isn't practical.

Thanks

Make the files have functions as you are thinking. The include files in the include folders are a ready supply of examples.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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