mIRC Home    About    Download    Register    News    Help

Print Thread
#40548 08/08/03 06:36 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
using moo.dll $dll(" $+ $scriptdirmoo.dll $+ ",cpuinfo,_)
i need to grab the cpu load % and set it as a variable
it returns somthing like this;
1-AMD , 1095MHz, 64KB (14% Load)


http://MTec89Net.com
irc.freenode.net #MTec89Net
#40549 08/08/03 06:56 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
if i read it right you want to extract:
14% from:
1-AMD , 1095MHz, 64KB (14% Load)
?
if so:
tokenize 32 $dll(" $+ $scriptdirmoo.dll $+ ",cpuinfo,_)
set %yourvar $remove($5,$chr(asc value for "("))


new username: tidy_trax
#40550 08/08/03 07:16 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
i cant find the $asc # for ( because i get $asc invalid format


http://MTec89Net.com
irc.freenode.net #MTec89Net
#40551 08/08/03 07:22 PM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
I am sure it is $chr(40)

#40552 08/08/03 07:31 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
To return 1-AMD , 1095MHz, 64KB (14% Load), use your dll call
  • $dll($+(",$scriptdirmoo.dll,"), cpuinfo, _)
To return 14% Load), chop off everything before the first ( with
  • $gettok($dll($+(",$scriptdirmoo.dll,"),cpuinfo,_), 2, 40)
To return 14% load, use $left( , -1) to chop off the final ).
  • $left($gettok($dll($+(",$scriptdirmoo.dll,"),cpuinfo,_),2,40), -1)
To return 14%, use a $gettok( , 1, 32) to grab everything from the result before the first space.
  • $gettok($gettok($dll($+(",$scriptdirmoo.dll,"),cpuinfo,_),2,40), 1, 32)
To return 14, use a $getok( , 1, 37) to grab everything from the result before the first %.
  • $gettok($gettok($dll($+(",$scriptdirmoo.dll,"),cpuinfo,_),2,40), 1, 37)
cool


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#40553 08/08/03 07:38 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
thanks smile but can i add text on top of a progress bar?


http://MTec89Net.com
irc.freenode.net #MTec89Net
#40554 08/08/03 10:51 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
If you are creating your progress bar in a custom @picwin, yes. You just update the progress bar and re/drawtext your text over the top.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#40555 08/08/03 11:01 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
im doing one using mdx


http://MTec89Net.com
irc.freenode.net #MTec89Net
#40556 09/08/03 02:10 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
why not use the rambar function... it gives u percent used (without % sign) out of a whole 100. It the function that moo uses to add the "14%" to the cpuinfo method


-KingTomato
#40557 09/08/03 03:15 AM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
i tried it before and cant get it to work, and everything works fine (except for my lag bar) so i would like to not screw with it wink


http://MTec89Net.com
irc.freenode.net #MTec89Net
#40558 09/08/03 03:41 PM
Joined: Dec 2002
Posts: 117
R
Vogon poet
Offline
Vogon poet
R
Joined: Dec 2002
Posts: 117
It's 35 actually, 40 is '('
Code:
/alias ascii echo -a Ascii for $+(",$1,") is: $asc($1)

One of my favorite aliases smile


$input(Me like stars, You too?)
#40559 09/08/03 04:55 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
This is my favorite alias too. I use this:
Code:
getasc bset -t &a 1 $$1- | echo -s $bvar(&a,1-)


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#40560 09/08/03 05:09 PM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
You misread his question, it was "(" he wanted the ASCII code for. He used "#" to represent the word "number". grin


Link Copied to Clipboard