mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
can anyone help me make a script that checks its uploaded script on start-up of mirc... after the script cheched the uploaded script it will show what script are loaded or if it has any script loaded...

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
On *:Start: {
  echo -a $event
  dialog -mo loaded.scripts loaded.scripts
}

dialog loaded.scripts {
  title "Loaded Scripts"
  size -1 -1 112 111
  option dbu
  list 1, 3 3 105 105, size
  box "", 2, 2 -1 108 111
}

On *:Dialog:loaded.scripts:init:0: {
  var %x = 1
  did -b $dname 1
  while (%x <= $script(%x)) {
    .timer 1 %x if ($dialog(loaded.scripts)) did -a $dname 1 $nopath($script(%x))
    inc %x
  }
}


-Andy

Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
how about no dialog box.. just displaying it in the status window...

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Sorry dude, tried making it look effective. Try this.. smile

Code:
On *:Start: {
  var %x = 1
  echo -a Current Scripts Loaded..
  while (%x <= $script(%x)) {
    .timer 1 %x echo -s $+(%x,.) $nopath($script(%x))
    inc %x
  }
  .timer 1 $calc($script(0) + 1) echo -s End of currecnt loaded scripts.
}


-Andy

Joined: Feb 2004
Posts: 206
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Feb 2004
Posts: 206
Quote:
Sorry dude, tried making it look effective. Try this.. smile

Code:
On *:Start: {
  var %x = 1
  echo -a Current Scripts Loaded..
  while (%x <= $script(%x)) {
    .timer 1 %x echo -s $+(%x,.) $nopath($script(%x))
    inc %x
  }
  .timer 1 $calc($script(0) + 1) echo -s End of currecnt loaded scripts.
}


-Andy


Or perhaps (workiing on Andy's code):
Code:
 
On *:Start: {
  var %x = $script(0) 
  echo -a There are %x scripts loaded.
  while (%x) {
    echo -s --> $nopath($script(%x))
    dec %x
  }
}
 


(tested).

Cheers,

DK


Darwin_Koala

Junior Brat, In-no-cent(r)(tm) and original source of DK-itis!
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
thank.. it really helps me make sure i dont have any scripts loaded.. would it be posibble if the loaded script be detected its size... like after the script file it will be acompanied by its size... thankz for the help.. more power..

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Edit:

echo -s --> $nopath($script(%x))

to:

echo -s --> $nopath($script(%x)) - $bytes($file($script(%x)).size,k) kB

Note that if you don't want the size to be in kB, you can use:

echo -s --> $nopath($script(%x)) - $file($script(%x)).size


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard