Hello Graham,
As you know, the command for an item which PowerPro has added
to the Explorer context menu is run repeatedly, once for each
selected file.
You can send each filename one at a time to a script,
which either collects them into separate static variables,
or into only one long string in a static variable.
The built-in variables Context and ContextLast, described
in PowerPro Help - Index - "Context menu in Explorer",
are useful in the script for identifying the first and last files.
Command in the context menu:
[EMAIL PROTECTED](_file_)
> I'd like to be able to right clikc to run <myscript> which would
> receive the command line of myscript <file1> <file2> <file3>
;;------- This is ContextScript.powerpro --------------
;; if you prefer to collect them in separate variables
;; to be sent as separate args to "myscript"
@FileIn
static filenumber
If(Context == 0)do
Context = 1
filenumber = 1
static File1 = arg(1)
else
filenumber = filenumber + 1
assign("File" ++ filenumber,arg(1))
endif
If(ContextLast)do
.myscript(file1,file2,file3,file4,file5,file6,file7,file8)
endif
quit
;;--------------------------------------------
but I don't like that method (passing each filename as a
separate arg() from the first script to your "myscript").
There is a limit on how many separate args you can pass
to a script. What happens when more than 8 files are selected?
Instead we could collect the filenames in one long static
variable and call myscript with only one arg. You would have
to modify the second script to only expect one long string.
;;----------------------------------------------
;; this is ContextScript.powerpro
;; collecting the filenames in one variable
@FileIn
static
If(Context == 0)do
Context = 1
static FileList = arg(1)
else
FileList = FileList ++ ?", " ++ arg(1)
endif
If(ContextLast)do
.myscript(FileList)
endif
quit
;---------------------------------------------
Even better, unify the two scripts into one which starts
like either of my scripts above, and then (inside the second
if routine, for ContextLast) does the commands from your
original script:
If(ContextLast)do
; whatever your script does to the files
endif
quit
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12hofvfse/M=362335.6886445.7839731.1510227/D=groups/S=1706030409:TM/Y=YAHOO/EXP=1123908481/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In
low income neighborhoods, 84% do not own computers. At Network for Good, help
bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~->
Attention: PowerPro's Web site has moved: http://www.ppro.org
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/