mIRC Home    About    Download    Register    News    Help

Print Thread
Popup Issues #265592 05/06/19 01:48 AM
Joined: Jun 2019
Posts: 6
T
TheArkNet Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Jun 2019
Posts: 6
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?

Re: Popup Issues [Re: TheArkNet] #265596 05/06/19 10:11 PM
Joined: Jan 2004
Posts: 1,167
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,167
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

Re: Popup Issues [Re: maroon] #265600 07/06/19 02:36 AM
Joined: Jun 2019
Posts: 6
T
TheArkNet Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Jun 2019
Posts: 6
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:

Re: Popup Issues [Re: TheArkNet] #265601 07/06/19 10:51 AM
Joined: Jan 2004
Posts: 1,273
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,273
You can't use the tab character

Re: Popup Issues [Re: TheArkNet] #265602 07/06/19 08:55 PM
Joined: Feb 2003
Posts: 2,626
Raccoon Online
Hoopy frood
Online
Hoopy frood
Joined: Feb 2003
Posts: 2,626
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


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: Popup Issues [Re: Raccoon] #265603 08/06/19 12:00 AM
Joined: Jun 2019
Posts: 6
T
TheArkNet Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Jun 2019
Posts: 6
The tabs where it *facepalm* Didn't even mean to have them in there...