Write values and variables to another script

Hi,
how can i write a text like: (set dida to display dialog x) into another script without opening this ?
(this “special” script has to store only a list of variables and his respective value)
Of course, by writing a script which asks me what i want to write into the other script. (this script will be saved in the contextual menu, and the “library script” in a subfolder of the same path)

-the first script should be able to write / read from the library script
-the library script acts only as library for the output of the first one

i’ll explain: i want to insert often used strings in “Script Editor”, like “display dialog x, tell application x to quit, move selection to choose folder”, -only to quote my absolute first functional applescript -snippets ect. ( i’m sick to seach my common template -scripts via contextual menu).
This helper -script aids me to get more faster in writing scripts (and so forth), writing text for me, while i type in only 3 letters. (one variable of the library script)

(I think that there are no problems by adding new entries to this “special” script, without losing the old data)

My only question is how can i write variables and values in another script ? :smiley:

I have never done anything like that, but my guess would be the only way would be to script Script Editor. There is a scripting dictionary for Script Editor so check that out. I have only ever used it to automate saving a run-only copy of scripts.