|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
OP
Fjord artisan
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...
|
|
|
|
Joined: Oct 2005
Posts: 1,671
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,671 |
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
Fjord artisan
|
Fjord artisan
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
Fjord artisan
|
OP
Fjord artisan
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.
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
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,630
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,630 |
He said webserver, and no, but close enough. Try 5 minutes.
|
|
|
|
Joined: Sep 2005
Posts: 2,630
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,630 |
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
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,125
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,125 |
$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?
|
|
|
|
Joined: Sep 2005
Posts: 2,630
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,630 |
$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,125
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,125 |
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).
|
|
|
|
Joined: Sep 2005
Posts: 2,630
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,630 |
That's what I mean.. dialog t {
size -1 -1 300 300
title ""
option dbu
} $isdialog(t) - $true $dialog(t) - $null
|
|
|
|
|
|