mIRC Home    About    Download    Register    News    Help

Print Thread
#227988 02/12/10 02:53 AM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
OP Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
I'd like to be able to script a custom menu for URL's or atleast be able to add to the current one.


I am SReject
My Stuff
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
+1

I think another more broad suggestion was to enable a /popup command to trigger a popup under the cursor, which would be used in ON HOTLINK. This would go along with the menus {}, but I think it probably needs to be fleshed out to be useful to the real world use cases.

Having arbitrarily named menus (like dialog definitions) would be useful for this too. Presumably, it would enable the user to do something like /popup MENUNAME. The menu name of "url" could be used in a hotlink in this way.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
argv0 #227992 02/12/10 05:40 AM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
OP Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
+1 to you as well.

I tryed hotlinking the URLs first, setting a varaible, halting and then writing me own menu, but the URL menu still got displayed.

So maybe something like this:
Code:
on ^*:HOTLINK:*stuff*:#:{
  ;do checks as normal
  if (this-stuff isin $hotline) {
     hotlinkmenu -l HLMenu channel

     ;This specifies which menu to call if the user right clicks on the hotlink.
     ;The -l(optional) means it's a local menu(One that must be in the same script as this)

     ;You can a second menu type, and the hotlinkmenu will be displayed at the bottom of the specified menu type

  }
  else { halt }
}
Menu HLMenu {
  .Echo:{ echo -a $hotline }
}



Last edited by FroggieDaFrog; 02/12/10 05:59 AM.

I am SReject
My Stuff
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Your proposal seems good but:

1) -l for localness should be applied on the menu definition, not on the alias callsite. This would make it match up with other locally defined features, like alias -l and dialog -l.

2) I like the proposal of having multiple arbitrary menus specified in a popup, but I'm not sure if this is technically possible. If it is, though, I'd propose having an "unlimited" amount of arbitrary names:

/hotlinkmenu channel HLMenu OtherMenu ...

They would be appended top to bottom in the order they were provided, so channel would come first, HLMenu next, etc.

3) I still think the name /popup (or /createpopup) is better/more generic than /hotlinkmenu-- specifically because this would allow users to create popups in other situations as well (dialogs, left clicking on custom windows, etc). It is not a functionality that's necessarily coupled to hotlink events.



- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Mar 2008
Posts: 93
B
Babel fish
Offline
Babel fish
B
Joined: Mar 2008
Posts: 93
+1 for that!
I wrote a script that performs a few checks on an URL, to see if it is a malicious URL (or a rickroll) or not what it claims to be (images returning HTML/JS). My current workaround is enabling a specific region with on HOTLINK handlers and doing a plain double-click - but sometimes, this is just plain weird and feels wrong. A simple right-click, check URL next to the current open/copy would be great and possible with that addition.

BhaaL #228135 08/12/10 05:12 PM
Joined: Apr 2003
Posts: 342
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Apr 2003
Posts: 342
Why /hotlinkmenu? Why not just /menu or /showmenu? I am personally not exactly keen on this idea do to how menu's function in mIRC.

Last edited by MeStinkBAD; 08/12/10 05:13 PM.

Beware of MeStinkBAD! He knows more than he actually does!
argv0 #228139 08/12/10 11:31 PM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
OP Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
The reason I only said only a second menu, was for the popups. so if "hotlinkmenuname channel" was specified, then the menu would be displayed at the bottom of the channel popup/menu.

The reason I didn't go for more functionality is because there is already a popup/menu for urls, and I would just like to be able to change that menu.


I am SReject
My Stuff

Link Copied to Clipboard