Well, I had decided not to update the script anymore.
But, I couldn't resist since I found that the "map & vec"
version is ways more flexible than the "var & vec" version.
The below is just the simplest example of the flexibility of
the "map & vec" version. I know you could do the below with
the "var & vec" version but it became already cumbersome to
define two variables "aliaslst1" & "aliaslst2".

BTW, I'm not sure that someone will find it useful or not,
and I'm aware of that this is opposite to current trend of
"All-in-One" (file) approach. However, it's surely
interesting.

I assumed two script files, "aliases1.powerpro" which may
be consisted of simple "one line" aliases only, and
"aliases2.powerpro" which may be consisted of long
"multi-line" aliases only.

I upload only "@cmdlists", since others are almost identical
to the previously uploaded "map & vec" version with just
one modification:
do(".@"++word(x0,1)++...) --> do(aliasmap[word(x0,1)]++...)

-------------------------------------------------------------

@cmdlists
local fh
if(aliasmap)
map.destroy(aliasmap)
if(aliasvec)
vec.destroy(aliasvec)
static aliasmap=map.create(200,0)
static aliasvec=vec.create(200,1)
for(j=1;j<=2;j=j+1)
local scriptnm="aliases"++j
fh=file.open(scriptfolder++"/"++scriptnm++".powerpro","r")
for(fh>0)
local x0=file.readstring(fh)
if(file.eof(fh))
break
if(select(x0,1)=="@")do
aliasmap[word(remove(x0,1),1)]="."++scriptnm++word(x0,1)
aliasvec[vec.length(aliasvec)]=word(remove(x0,1),1)
endif
endfor
file.close(fh)
endfor
quit

-------------------------------------------------------------



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/JV_rlB/TM
---------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to