mIRC Home    About    Download    Register    News    Help

Topic Options
#40548 - 08/08/03 07:36 PM stripping
MTec89 Offline
Hoopy frood

Registered: 25/07/03
Posts: 742
Loc: Ohio, U.S.A.
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

Top
#40549 - 08/08/03 07:56 PM Re: stripping
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
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

Top
#40550 - 08/08/03 08:16 PM Re: stripping
MTec89 Offline
Hoopy frood

Registered: 25/07/03
Posts: 742
Loc: Ohio, U.S.A.
i cant find the $asc # for ( because i get $asc invalid format
_________________________
http://MTec89Net.com
irc.freenode.net #MTec89Net

Top
#40551 - 08/08/03 08:22 PM Re: stripping
Watchdog Offline
Hoopy frood

Registered: 09/12/02
Posts: 2984
Loc: Hill End, NSW, Australia
I am sure it is $chr(40)
_________________________
Induced IRC
irc.induced.net

Top
#40552 - 08/08/03 08:31 PM Re: stripping
Hammer Offline
Hoopy frood

Registered: 07/12/02
Posts: 1321
Loc: Georgia, USA
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

Top
#40553 - 08/08/03 08:38 PM Re: stripping
MTec89 Offline
Hoopy frood

Registered: 25/07/03
Posts: 742
Loc: Ohio, U.S.A.
thanks smile but can i add text on top of a progress bar?
_________________________
http://MTec89Net.com
irc.freenode.net #MTec89Net

Top
#40554 - 08/08/03 11:51 PM Re: stripping
Hammer Offline
Hoopy frood

Registered: 07/12/02
Posts: 1321
Loc: Georgia, USA
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

Top
#40555 - 09/08/03 12:01 AM Re: stripping
MTec89 Offline
Hoopy frood

Registered: 25/07/03
Posts: 742
Loc: Ohio, U.S.A.
im doing one using mdx
_________________________
http://MTec89Net.com
irc.freenode.net #MTec89Net

Top
#40556 - 09/08/03 03:10 AM Re: stripping
KingTomato Offline
Planetary brain

Registered: 04/01/03
Posts: 3012
Loc: New Hampshire, USA
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

Top
#40557 - 09/08/03 04:15 AM Re: stripping
MTec89 Offline
Hoopy frood

Registered: 25/07/03
Posts: 742
Loc: Ohio, U.S.A.
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

Top
#40558 - 09/08/03 04:41 PM Re: stripping
Rich Offline
Vogon poet

Registered: 13/12/02
Posts: 117
Loc: Netherlands
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?)

Top
#40559 - 09/08/03 05:55 PM Re: stripping
qwerty Offline
Hoopy frood

Registered: 07/01/03
Posts: 2523
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

Top
#40560 - 09/08/03 06:09 PM Re: stripping
Watchdog Offline
Hoopy frood

Registered: 09/12/02
Posts: 2984
Loc: Hill End, NSW, Australia
You misread his question, it was "(" he wanted the ASCII code for. He used "#" to represent the word "number". grin
_________________________
Induced IRC
irc.induced.net

Top