Silo Posted August 3, 2008 Report Share Posted August 3, 2008 Hi gang, is it possible to control or utilise two items using an $iif? I'm having trouble explaining this one, so I'll show my code, then try and explain what I'm hoping to do... $iif($var(%page),$style(1)) Open MP3:{ .timerscript -m 1 1 load.mp3.data set %page did -vf side.bar 10 did -h side.bar 3 } $iif(!$var(%page),$style(1)) Open Nicklist:did -vf side.bar 1,3 | unset %page I'd like to have all of this only show up as one option on my popups. i.e if the Mp3 has been selected/opened the popup will only give the option of opening the nicklist and vice versa. As it is now the only way to show it it use the dynamic popup as a tick next to the current list. Is this possible? Link to comment Share on other sites More sharing options...
Guest Travis Posted August 3, 2008 Report Share Posted August 3, 2008 I'm having trouble understanding what you want. I know it's possible though and once I understand it I can help. If the mp3 dialog is open you dont want to see the command to open it? And you only want to see the command to open nicklist? If the dialog is open wouldn't you want the command to say "Close" instead of Open? Or you want no command at all, only 'open nicklist'? Link to comment Share on other sites More sharing options...
The Gate Keeper Posted August 3, 2008 Report Share Posted August 3, 2008 (edited) i'm not too sure but try this... $iif(!$did(side.bar,10).visible,Open MP3):{ .timerscript -m 1 1 load.mp3.data did -vf side.bar 10 did -h side.bar 3 } $iif($did(side.bar,10).visible,Open Nicklist): did -vf side.bar 1,3 This removes the need for the variable as it checks to see whether or not one of the ids are hidden or not. Though i may have gotten the syntax wrong cause i don't have the mIRC help file and i'm just basing it off what i remember. But others may be able to correct it to get it working. Edited August 3, 2008 by The Gate Keeper Link to comment Share on other sites More sharing options...
Silo Posted August 4, 2008 Author Report Share Posted August 4, 2008 Thanks guys, I'm sorry Travis, I knew I was going to have a hard time explaining that one. Sometimes I have trouble describing simple thing in a concise manner. TGK was on the right track, though I'm afraid it didn't work. It did open the MP3 player, but once opened the command still said "Open Mp3" instead of the option to open the Nicklist. If you guys recall I was asking for a similar thing on PoW, you guys pointed me towards the .visible command for dialogs, but I could never get it to perform. I think you're on the right track, TGK. Thanks guys, you're amazing Link to comment Share on other sites More sharing options...
Warrior124 Posted August 4, 2008 Report Share Posted August 4, 2008 $iif(!$did(side.bar,10).visible,Open MP3,Open Nicklist):{ if ($did(side.bar,10)) { .timerscript -m 1 1 load.mp3.data did -vf side.bar 10 did -h side.bar 3 } else did -vf side.bar 1,3 } Link to comment Share on other sites More sharing options...
Silo Posted August 4, 2008 Author Report Share Posted August 4, 2008 Thanks Warrior, Travis & TGK! Sad to say, it still doesn't work. It switches to the MP3 list (Tab <id> 10) but won't switch back to the Nicklist (Tab <id> 1). The .visible comand should do the trick, but sadly it just won't go the other way Link to comment Share on other sites More sharing options...
The Gate Keeper Posted August 4, 2008 Report Share Posted August 4, 2008 are you doing this in popups.ini or are you making a remote file? I know a method around this, but just need to know what you are doing it in so that i can give you the correct instructions. Link to comment Share on other sites More sharing options...
Silo Posted August 4, 2008 Author Report Share Posted August 4, 2008 Hi TGK. For now I am using popups.ini though I did think about moving them to an .mrc file. Link to comment Share on other sites More sharing options...
Guest Travis Posted August 4, 2008 Report Share Posted August 4, 2008 I love popups.dll but this is a regular menu you have. From my experience with popups.dll, you will have to put multiple commands in an alias anyways. Warrior did it exactly as I would have. /dll popups.dll AddItem menutitle end Open $iif(!$did(side.bar,10).visible,MP3,Nicklist) $cr side.bar.menu alias side.bar.menu { if ($did(side.bar,10)) { .timerscript -m 1 1 load.mp3.data | did -vf side.bar 10 | did -h side.bar 3 } else { did -vf side.bar 1,3 } } I'm still not very clear on what you want. You want it to only say mp3 or nicklist? You want it to only show Open Nicklist if Open MP3 has already been selected. And you do not want it to change to 'Close MP3' with the 'Open Nicklist' only appearing when mp3 is open? Link to comment Share on other sites More sharing options...
err0r Posted August 5, 2008 Report Share Posted August 5, 2008 i use xpopup and use $iif to use the disable style if it's a circumstance that would require the item not to be clickable.. like different networks or if it's to a dialog that is already open etc. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now