29 Jan 11, 08:47AM
Thanks Bukz, another script I can take off my to-do list. :D
And now for some more of my abstract scripts yay!
serial - creates a series of aliases with similar names and similar content
nestalias - creates a "nested" alias -- one that redefines itself each time it is activated
And now for some more of my abstract scripts yay!
[SELECT ALL] Code:
alias serial [
tmp_command = $arg3
serialnum = 0
loop sa $arg2 [
alias (concatword $arg1 $sa) (tmp_command)
+= serialnum 1
]
] // serial (base name) (number to make) [meta-command]
// Uses $serialnum as its counting variable
alias nestalias [
tmp_name = $arg1
tmp_layers = $arg2
tmp_command = $arg3
nestnum = 0
tmp_alias = (alias $tmp_name [])
loop nn $tmp_layers [
tmp_alias = (concat "alias" $tmp_name "[" $tmp_alias "]" ";" (tmp_command))
+= nestnum 1
]
alias $tmp_name $tmp_alias
] // nestalias (alias name) (number of layers) [side meta-command]
// Uses $nestnum as its counting variable
nestalias - creates a "nested" alias -- one that redefines itself each time it is activated