Is it possible to pass a arbitrary argument to a wb program and to make it inside the ContextMenus.cfg ?
In general arguments are passed to workbbnch prgrams through the tootypes of the icon being clicked on. Whether that be a program icom itself or a project con with the program set as default tool. So it's not really meaningful to pass arguments in the way you are attempting.
How does fastcopy usually receive the destination argument?
You should use the CLI option
eg making aguess at the programs template, adjust to fit reality...
Multiple,To RAM:,CLI,Work:Dev/FastCopy/FastCopy DEST RAM: FILES {F}
The following is taken from the docs available in SYS:Documentation/Comoddities/ContextMenus.doc [edit]tried add a file url but it added http to it, not helpful [/edit]
Quote:
Special arguments:
Some special arguments can be used in the command executed when a menu item is clicked. Those arguments will be replaced accordingly before execution of the command. Arguments can be used in general menus or tooltype ones and any number of them can be used at once.
"%o" will be replaced by the filename of the file under the mouse pointer (even if multiple files are selected) "%O" will be replaced by the filename of all selected files Note: "O" stands for "only".
"%f" will be replaced by the full name (pathname + filename) of the file under the mouse pointer (even if multiple files are selected) "%F" will be replaced by the full name of all selected files Note: "F" stands for "full".
"%i" works like %o but the icon name is also processed "%I" works like %O but icon names are also processed Note: "I" stands for "icons".
"%a" works like %f but the icon name is also processed "%A" works like %F but icon names are also processed Note: "A" stands for "all".
Examples: Copy %i ram: -> Copy file file.info ram: rx script.rexx %o -> then retrieve the filename in your script
"%d" will be replaced by the directory name where the menu item is used (i.e. the current directory).
I don't know if I understand well but I have just 1 copy of my prog. The files that I select are just files like .o .debug and copy of .o and .debug. There are not my program himself.
And I obtain the 2 debugs log with just 1 run (one click in the contextual menu)
My goal is to select multiple files...
Concretely, I select multiple files in workbench (files that you see selected in the previous grab) and I right click to launch the prog FastCopy who might list me all the files in 1 time.
With the same files minus the last one, it works. With the 5 files selected, it runs twice.
Yes, I remove the argc[0] because the program name was useless for me.
will add the \n tomorrow, you are right, it will be more easy to read.
Thank you Broadblues, to take in consideration my problem, nice ;)