mIRC Home    About    Download    Register    News    Help

Print Thread
#163143 26/10/06 07:00 PM
Joined: Jul 2006
Posts: 248
B
bwuser Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Jul 2006
Posts: 248
could someone tell me how to make a script that loads all scripts from /mirc/script2/
and unloads all scripts from /mirc/script1/
just by pressing 1 button lets say 'F11'

and echo scriptset 1 Loaded
or something
so that i could change between a full set of scripts with 1 push of a button

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
so, you already defined it
you already know all the file names
you already know what alias name you are going to use
what do you need help with making a list of the files?

Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
Code:
alias f11 {
noop $findfile($mircdirscript1,*.mrc,0,load -rs $1)
echo Fileset 1 loaded
}


billythekid
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Code:
alias f11 {
if ($isload(some.mrc)) { firstgroup }
else { secondgroup }
}
alias firstgroup {
.unload -rs this1.mrc
.unload -rs this2.mrc
.load -rs that1.mrc
.load -rs that2.mrc
}
alias secondgroup {
.load -rs this1.mrc
.load -rs this2.mrc
.unload -rs that1.mrc
.unload -rs that2.mrc
}
alias isload {
  var %isload = $1-
  var %i = 1
  while (%i <= $script(0)) { if ($nopath($script(%i)) == %isload) return $script(%i)
    inc %i
  }
}


edit, missed a )

Last edited by MikeChat; 26/10/06 08:31 PM.
Joined: Jul 2006
Posts: 248
B
bwuser Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Jul 2006
Posts: 248
what im looking to do is it to check whats in the c:\mirc\script1\
or c:\mirc\script2\ dir and load all .mrc files into remote and all .ini into
aliases.
so i can easily add scripts just by putting them into the dirs

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
so try writing it using $findfile, if you have a problem show us your code and we'll help you


Link Copied to Clipboard