mIRC Homepage
Posted By: TheArkNet Popup Issues - 05/06/19 01:48 AM
I'm trying to create popups for a new script I'm working on but when I do a channel popup with submenus and test it the menu pops up but has all the options listed in the primary popup instead of having a submenu popout.

Also $iif statements aren't resolving in popups they display as the full code up to the :.

Any suggestions?
Posted By: maroon Re: Popup Issues - 05/06/19 10:11 PM
Is this the kind of stuff you're trying to put in the menu?

Code:
menu channel {
  top menu
  .level 1 menu
  ..level 1 label:noop
  ..level 1 labe2:noop
  ..$iif($asctime($ctime,ddd) == Sun, $style(1) Today is $v2):noop
  ..$iif($asctime($ctime,ddd) == Mon, $style(1) Today is $v2):noop
  ..$iif($asctime($ctime,ddd) == Tue, $style(1) Today is $v2):noop
  ..$iif($asctime($ctime,ddd) == Wed, $style(1) Today is $v2):noop
  ..$iif($asctime($ctime,ddd) == Thu, $style(1) Today is $v2):noop
  ..$iif($asctime($ctime,ddd) == Fri, $style(1) Today is $v2):noop
  ..$iif($asctime($ctime,ddd) == Sat, $style(1) Today is $v2):noop
  ..level 2 menu
  ...level2 label1:noop
  ...level2 label2:noop
}


This is how it looks if you're putting your channel item in a script. If you want it in the popups file, put the code in-between the curly braces in the view/channel tab of the alt+P editor
Posted By: TheArkNet Re: Popup Issues - 07/06/19 02:36 AM
Code:
menu channel {
  	Register $chan : var %cspass $?*="Password For $chan " | cs register # %cspass
  	Topic Control
  	.Set New Topic : topic # $$?="New Topic for $chan"
  	.Topic lock
  	..On : cs set # keeptopic on
  	..Off : cs set # keeptopic off
  	Set New Entry Message : cs set # entrymsg $$?="New Entry Message"
  	Set Channel to Secure (Nickserv users only) : cs set # secure on
}





That's what I've got but it appears like this:
Posted By: Loki12583 Re: Popup Issues - 07/06/19 10:51 AM
You can't use the tab character
Posted By: Raccoon Re: Popup Issues - 07/06/19 08:55 PM
To elaborate: Use CTRL + H for indentation in mIRC's script editor, or use space-space-space-space in Notepad. Tab-indent (0x09) is not supported by the mSL parser.

For extra fun: the Tab character is used in Menus to signify a right-justified portion of the menu text, usually an accelerator hotkey. eg: Copy Nickname $+ $chr(9) $+ Ctrl+F7: /CF7
Posted By: TheArkNet Re: Popup Issues - 08/06/19 12:00 AM
The tabs where it *facepalm* Didn't even mean to have them in there...
© mIRC Discussion Forums