Here is the problem. You have N scripts, where N is a large number, all wanting to talk to each other. They talk to each other very fast, so you do not want to write to file. How is this possible? Well, you would need a virtual memory. One option is the terminal script:
http://www.autohotkey.com/forum/viewtop ... highlight=
There are various shortcomings. For example, memory should be assigned dynamincally, and it needs a public name. One should be able to declare public "Names" of files or communication channels in virtual memory, space is dynamically allocated, so that two scripts can refer to memory by name rather than by the address. It should be able to handle cases when memory is full. Also, there are some overheads involving ControlGetText, etc. In actual practice, the terminal script would work just fine, simply because of the overall speed of ahk scripting.
But, there should be a better, or at least more elegant way: some way that would solve the theoretical problem of 300 scripts wanting to communicate very fast with one another.
(1) I want dynamically allocated memory. In that case, I can simply have an edit box hold a list of names and addresses, so that's easy.
(2) I want to eliminate the GUI overhead. Well -- I can use clipboard. Have one huge string in the clipboard, of the form:
Name1 Index1 Length1 Name2 Index2 Length2 .... File1 File2 File3 ...
The first part of the string is a file allocation table. Filereads would just look up the file in the index and take the substring from there. It would be accessible to every script, and it would obviate the need for writing to actual files on disk.
However, this is good only for short files, as we do not have access to fast string functions, making manipulating large strings to be unwieldly, at present. For example, it seems that, just to change an index, using the scripting language, you would have to either rebuild the string from scratch or use the cumbersome stringLefts, etc.
Questions:
1)Are there any other implementations of virtual memory, besides the clipboard and the gui?
2)Are there ways to have fast string functions, such as pointers to strings indices, so that we can use overwrites rather than string append, etc.? (And we would face the problem, then, of fragmentation -- but that can be solved later.) Probably memory operation on a lower level than ahk was intended for?