mIRC Home    About    Download    Register    News    Help

Print Thread
#192666 07/01/08 12:02 AM
Joined: Jan 2008
Posts: 2
G
G3n7r0 Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
G
Joined: Jan 2008
Posts: 2
Hi.

Here's what I've been trying to do..
I want to get a popup menu which will show up only those programs which actually exist on the harddrive, for example:

.Programs
.. $iif($exists(C:\Program Files\Internet Explorer\iexplore.exe), Internet Explorer:/run C:\Program Files\Internet Explorer\iexplore.exe)
..MS Word:/run C:\Program Files\Microsoft Office\Office\winword.exe

This syntax is ofcourse flawed and it returns '* Invalid format: $iif' so my question is how to achieve something like that, which, well, works wink?

Thanks for your help, and I apologize if something like this has been already discussed.

Last edited by G3n7r0; 07/01/08 12:02 AM.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Code:
.Programs
..$iif($exists(C $+ $chr(58) $+ \Program Files\Internet Explorer\iexplore.exe),Internet Explorer): run C:\Program Files\Internet Explorer\iexplore.exe


The problem you have is the colon. It's trying to parse using the colon to separate the title from the command.

Other than using $chr(58), you could also just put the path into a variable and use the variable.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2008
Posts: 2
G
G3n7r0 Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
G
Joined: Jan 2008
Posts: 2
Sorry for the slow response, been occupied with university.
Thanks for your tips.

Here's what I used and what works:

..Internet Browsers
... $iif($exists(C $+ $chr(58) $+ \Program Files\Internet Explorer\iexplore.exe) == $true , Internet Explorer):/run C:\Program Files\Internet Explorer\iexplore.exe
... $iif($exists(C $+ $chr(58) $+ \Program Files\Avant Browser\avant.exe), Avant Browser):/run C:\Program Files\Avant Browser\avant.exe
... $iif($exists(C $+ $chr(58) $+ \Program Files\Mozilla Firefox\firefox.exe), Firefox):/run C:\Program Files\Mozilla Firefox\firefox.exe



Link Copied to Clipboard