mIRC Home    About    Download    Register    News    Help

Print Thread
#97706 15/09/04 09:14 PM
Joined: Sep 2004
Posts: 12
Pikka bird
OP Offline
Pikka bird
Joined: Sep 2004
Posts: 12
Don't suppose anyone knows definitively if there's a way of using a while loop or equivalent in $submenu ?
So far every time I've tried the menu has stopped working.

I have a menu where I need it to generate the items based on an unknown number of items, but where the first item that is returned doesn't match..
As a result, I need to increment a variable (an offset if you will), until $1 + offset gives me the correct type.

Any help?
~clean out of ideas~

Cheers, EqUaTe

#97707 16/09/04 06:44 PM
Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
It would help if you showed us your attempt at this, since your question isn't too clear to me. You should be able to perform any operation in an alias called by $submenu, including while loops, but it must return a valid popup i.e. in item:/command format. If this isn't returned correctly then it will immediately stop getting items for the menu

#97708 16/09/04 10:10 PM
Joined: Sep 2004
Posts: 12
Pikka bird
OP Offline
Pikka bird
Joined: Sep 2004
Posts: 12
It's alright, I got it figured out.
I'd deleted my code several times in frustration before I posted here..
Basically my problem was that I was trying to do a while loop BEFORE it entered into the if statements based on what $1 was. I moved it inside the if ($1 == begin) section and everything fell into place.. :-)

Now if only I could get it to put a : in the menu item.. $chr(58) doesn't work, still uses it as the : seperating the item name from the command frown


Link Copied to Clipboard