External handlers

Most all my longer more complicated scripts use handlers (what I used to call subroutines back in the day). I use the same subroutine over and over in multiple scripts. Generally when working on a new script I will find a way to improve the subroutine in some way. The problem is all my older scripts are still using the older unimproved subroutine.

I was wondering is there is a way in AppleScript for it to an call outside subroutine? This way I can update the main subroutine file and not have to update each script that has that subroutine in it.

Anyone know how to do this? Thanks

Either I did not get your question or you missed a basic strategy:

set my_lib to (load script file …)

is meant to be used for such libraries. Using tell my_lib or my_handler of my_lib calls the latest version you saved.

I have a folder in /Library/Appleication Support/ for such stuff (MySQL/Postgres/SQLite access, mail sending and things like that).

Jürgen

you’re probably correct on basic strategy, that is why I posted my question. I have always kept my scripts as whole scripts and have always been frustrated when something breaks and I have to figure out which scripts use that same handler.

I have found this subject, and now reading up
http://macscripter.net/viewtopic.php?id=24759

thanks