mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 580
N
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
Joined: Oct 2005
Posts: 1,741
G
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

Joined: Sep 2004
Posts: 200
I
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:)

Joined: Dec 2002
Posts: 580
N
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
Joined: Dec 2002
Posts: 3,547
S
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?

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
He said webserver, and no, but close enough. Try 5 minutes.

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Signed.

Joined: Dec 2002
Posts: 1,245
M
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 } }

Joined: Jan 2003
Posts: 2,523
Q
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
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
$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)

Joined: Jan 2003
Posts: 2,523
Q
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
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
That's what I mean..

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


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


Link Copied to Clipboard