I've made some modification to support arg(1), ... ,arg(8).
So, essentially only variable "param" has been changed.

1) I chose as a (arg) seperation character "," but you may
modify it as you like, e.g., "\,".

2) I chose as an escape character "\" instead of "'",
mainly for readability. It only appears 4 times in param.

3) I combined "runbox.powerpro" and "programs.powerpro"
respecting the idea of Ravi.

-------------------------runbox.powerpro-----------------------

@cmdline
do("*Exec","CommandLine file history =aliasvec")
quit

@cmdhook
local alias param
alias=word(x0,1)
param="(\""++replacechars(remove(x0,length(word(x0,1))+1),
      ",","\",\"")++"\")"
if(index(aliaslst," "++alias++" "))do
do(".@"++alias++param,"")
if(length(x0)!=revindex(x0," "))
x0=""
endif
quit

@cmdinput
local alias param x0
x0=InputDefault(x0,"PowerPro run","file history =aliasvec")
alias=word(x0,1)
param="(\""++replacechars(remove(x0,length(word(x0,1))+1),
      ",","\",\"")++"\")"
if(index(aliaslst," "++alias++" "))do
do(".@"++alias++param,"")
else
&(x0)
endif
quit

@cmdlists
static aliaslst aliasvec
local  sz i
aliaslst=" "
for(i=1; ;i=i+1)
sz=readline(pprofolder++"scripts/runbox.powerpro",i)
if(pproflag 0)
break
if(select(sz,1)=="@")
aliaslst=aliaslst++word(remove(sz,1),1)++" "
endfor
if(vec.exists(aliasvec))
vec.destroy(aliasvec)
aliasvec=vec.createFromWords(aliaslst,1)
quit

------------------------EOF----------------------------------



****  EDIT YOUR POSTINGS !!!! ****
Please remove as much as possible from original messages before replying to them.
________________________________________________ 
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