mIRC Home    About    Download    Register    News    Help

Print Thread
#93939 13/08/04 02:00 AM
Joined: Jul 2004
Posts: 169
S
ShinZon Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jul 2004
Posts: 169
mirc 6.03

Format: on <level>:LOAD:<commands>
Example: on 1:LOAD:/echo mIRC Script Loaded!

is there a way to do something like this:


ON:LOAD: {
IF $scriptdir\File.ini IS loaded then do something
}

does some script/code like this exist, where i can specify what happens if exact file was loaded ?

#93940 13/08/04 04:06 AM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
How about this for starters:

on *:load:/var %script = $script(0) | echo -a $script(%script)

Then I suppose you could do a:

Code:
on *:load: {
  var %script = $script(0)
  if ($script(%script) == whatever-name) { do stuff }
}


Will that accomplish what you want on a VERY basic level?


Those who fail history are doomed to repeat it
#93941 13/08/04 04:14 AM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Code:
on *:load:{
  if $script(File.ini) {
    [color:red]Do something[/color]
  }
}


Edit: If you meant you wanted to check the filename of the file which the load event is being triggered in then use this:
Code:
on *:load:{
  if $script == $scriptdirFile.ini {
    [color:red]Do something[/color]
  }
}


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard