Unfortunately GM_registerMenuCommand does not support arguments passed to it [1]. There is really nothing you can do about that except modifying the Greasemonkey extension itself, which is unlikely to occur since GM does not offer any user interface for entering arguments to menu commands. As a quick and dirty workaround you could 'export' the arguments to the page DOM as a global property of the window object, or to a Firefox preference (via GM_setValue), from where you could read it from Ubiquity at the time of command execution. Just an idea.
[1] http://wiki.greasespot.net/GM_registerMenuCommand#commandFunc On Tue, Jul 7, 2009 at 10:29 AM, Erik Vold<[email protected]> wrote: > > From freenode #greasemonkey: > > [01:24] <erikvvold> I've got an advanced question.. if I have this > userscript: http://gist.github.com/141958 and this ubiquity command: > http://gist.github.com/141957 and type "greasemonkey alert input Hello > World!" why isn't there a "Hello World!" alert > [01:25] <erikvvold> type the above into ubiquity ofcourse.. and the > ubiquity command is meant to find greasemonkey menu commands, and run > the commands, but I have tweaked this to accept input, and I want to > pass the input to the menu command > [01:26] <erikvvold> passing the input to the menu command is the part > that does not work at the moment > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en -~----------~----~----~----~------~----~------~--~---
