Jump to content

Run Function located in main script from included sub script


 Share

Recommended Posts

  • Developers

It isn't a best practice, but when you think how the #include works you can give the answer yourself. :)

All #include files are placed at the locations of the #include statements before the execution of the script starts!

Jos

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.
  :)

Link to comment
Share on other sites

Including the main script in the sub script?

The idea had crossed my mind but i was hoping there was a neater way to do it.

What is your general tip for situations like this, where you need multiple subscripts to do the same functions.

Simply putting the needed function in all subscripts?

Making one subscript that has all shared functions and including it in all subscripts?

Something more clever?

Link to comment
Share on other sites

Lantz,

This looks like a logging function that may be called repeatedly and/or from different places. This is the function that should be in an include file and then called from wherever you like.

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

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
 Share

  • Recently Browsing   0 members

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