> 
> Could you set me off in a direction for accomplishing the above ? I 
> want to implement different action for right and left mouse click 
on 
> a file. I cannot think of a way to do it without using ini's...
> 

First, why not use an ini?  Its a small extension to your existing 
script to write out multiple lines for each element in the menu 
representing the ini format
[n]
lcmd1=xxx
rcmd1=yyy
You'd have to ensure "configure|setup|all menus|right selects..." is 
checked.  You might have to split internal commands like clip into 
command and parameters
rcmd1=clip
rparam1=paste text
But test without first -- it might work.

Other ideas (each of these can be tried independently depending on 
you taste):

1.  Use Win.lastmouse (see help) along with vec.showmenu or filemenu 
function.  This means the menu display and subsequent check of which 
mouse key has to be in your script, not in More Commands.

2.  Call your script with argument, something like .showrecent(n) 
where n is a number.  Now establish different hot keys for the things 
you want to do, and call the script with a different n for each hot 
key.   Then have the script display the menu but interpret the result 
depending on n (you will need to use vec.showmenu or filemenu 
function).






> Just to enrich my understanding - implementing a menu with 
different 
> actions on the file could be done by using cl's , or is there a 
> better way ?

The only difference with cl's is that the menu is kept in memory, 
rather then being written to a file.  In your script you would just 
replace the inner loop writing to the file with cl functions to 
create the command list components directly.  You'd also have to do 
some initialization of the command list, of course.  This should 
improve performance.


Another way to improve performance, to be tried only if you find the 
menu display is too slow, is to use file.watchfolder to watch the 
recent folder.  Then build the file (or the cl) only when the recent 
folder changes, and not every time you display the menu.




Reply via email to