|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
OP
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)
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2003
Posts: 742 |
i cant find the $asc # for ( because i get $asc invalid format
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
|
|
|
|
Joined: Dec 2002
Posts: 1,321
Hoopy frood
|
Hoopy frood
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)
DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2003
Posts: 742 |
thanks but can i add text on top of a progress bar?
|
|
|
|
Joined: Dec 2002
Posts: 1,321
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2003
Posts: 742 |
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
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
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
OP
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
|
|
|
|
Joined: Dec 2002
Posts: 117
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 117 |
It's 35 actually, 40 is '('
/alias ascii echo -a Ascii for $+(",$1,") is: $asc($1)
One of my favorite aliases
$input(Me like stars, You too?)
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
This is my favorite alias too. I use this: getasc bset -t &a 1 $$1- | echo -s $bvar(&a,1-)
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
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".
|
|
|
|
|