Hi i’m new to these forums, and i’m fairly new to applescript too. (currently half way through Applescript the definitive guide) I do however have n00b to intermediate knowledge of a number of other scripting/programming languages.
I’ve just started my first serious applescript project (an algorithm to sequentially produce every possible alpha numeric string of a certain length).
However i’ve hit a big problem.
Is it possible to have dynamic variable names?
Unfortunately applescript does not support any double value arrays (as in each item has a number, a name and a value) so the next best thing is a dynamic number of variables with dynamic names such as var1, var2, var3 etc.
Longer answer: what you want is a hash type (or some derivation of). Most languages have one; AppleScript doesn’t. You could use a third-party library, e.g. [url=http://applemods.sourceforge.net/mods/Data/Types.php]http://applemods.sourceforge.net/mods/Data/Types.php[/url] but this will be relatively slow. Anyway, it sounds like you’re intending to do some serious data-crunching, something the AppleScript language is very poor at (being both slow and extension-deficient), so unless you can find a scriptable application that’ll give you the data processing support you need you’re probably better off using another language (Perl, Python, ObjC, whatever) and mix-n-match as necessary.