mIRC Homepage
Posted By: ShinZon on load event - 13/08/04 02:00 AM
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 ?
Posted By: landonsandor Re: on load event - 13/08/04 04:06 AM
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?
Posted By: starbucks_mafia Re: on load event - 13/08/04 04:14 AM
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]
  }
}
© mIRC Discussion Forums