mIRC Home    About    Download    Register    News    Help

Print Thread
New identifier's... $isdialog $ismenu $isgroup #148481 06/05/06 04:53 PM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline OP
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
All working in a simular way to $isalias... $isgoup could be scripted from $group, but I thought I'd add it anyways...


NaquadaBomb
www.mirc-dll.com
Re: New identifier's... $isdialog $ismenu $isgroup #148482 06/05/06 05:03 PM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Each of those identifiers could include ways to make the query local to a specific script file (with wildcards), or global.

$ismenu(*.mrc,nicklist)

-genius_at_work

Re: New identifier's... $isdialog $ismenu $isgroup #148483 06/05/06 08:21 PM
Joined: Sep 2004
Posts: 200
I
IR_n00b Offline
Fjord artisan
Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
All of them could be scripted, just some simpler than others.

You can use $script(0) to get the number of loaded scripts, $script(file.mrc) to see if a script is loaded, fopen and $fread to read from the file, and $regex to find a match (I.E $regex(%line,/^menu .*(nicklist).* {/i) :tongue:)

Re: New identifier's... $isdialog $ismenu $isgroup #148484 07/05/06 03:49 AM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline OP
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Yeah and I can also script a web server with mIRC... Point is much easier to add them internally, since there already exists code to parse mirc script files.


NaquadaBomb
www.mirc-dll.com
Re: New identifier's... $isdialog $ismenu $isgroup #148485 08/05/06 12:25 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
What you asked for wouldn't even take a 30 seconds to code. Could you code a web browser in 30 seconds?

Re: New identifier's... $isdialog $ismenu $isgroup #148486 08/05/06 12:30 AM
Joined: Sep 2005
Posts: 2,876
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,876
He said webserver, and no, but close enough. Try 5 minutes.

Re: New identifier's... $isdialog $ismenu $isgroup #148487 08/05/06 12:31 AM
Joined: Sep 2005
Posts: 2,876
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,876
Signed.

Re: New identifier's... $isdialog $ismenu $isgroup #148488 08/05/06 01:20 AM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
add in $isloaded
$isloaded(file.name).a
$isloaded(filename).r
or $isload(filename) returns alias or remote depending on where it was found or $false if not loaded

yes you can script this (i have already) but would be nicer to not have to

$iscomchar ($true/$false) to handle { if (($left($1,1) isin / $readini($mircini,text,commandchar)) || ($left($$1,1) == !) || ($left($$1,1) == @) || ($ctrlenter == $true)) { return $true } }

Re: New identifier's... $isdialog $ismenu $isgroup #148489 08/05/06 08:10 AM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
$isdialog and $isgroup are redundant, as "if ($dialog(name))" and "if ($group(#name))" do the job fine. I'm not sure I get $ismenu though, what would it do?


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: New identifier's... $isdialog $ismenu $isgroup #148490 08/05/06 04:43 PM
Joined: Sep 2005
Posts: 2,876
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,876
$dialog(name) will not tell if you a dialog exists, it will only tell you if it's open. Considering he compared them to $isalias, I'm guessing he wants to see if the dialog exists code-wise.

I'm thinking $ismenu could tell if you if there's a menu named "x" under the "y" menu: $ismenu(do something,menubar)

Re: New identifier's... $isdialog $ismenu $isgroup #148491 08/05/06 05:28 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
If a dialog isn't open, it doesn't exist. If you're both talking about dialog tables, it's a different matter (and something the OP should have explained, along with what $ismenu is supposed to do).


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: New identifier's... $isdialog $ismenu $isgroup #148492 08/05/06 05:32 PM
Joined: Sep 2005
Posts: 2,876
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,876
That's what I mean..

Code:
dialog t {
  size -1 -1 300 300
  title ""
  option dbu
}


$isdialog(t) - $true
$dialog(t) - $null