Sign in to follow this  
Followers 0
mladost1

OBJ reference

4 posts in this topic

I just want to find out if there could be a ObjCreate function used and what are the commands for BitComet (I want to make a script that starts it in e.g. 2 hours and stops it after 7).

Share this post


Link to post
Share on other sites



I just want to find out if there could be a ObjCreate function used and what are the commands for BitComet (I want to make a script that starts it in e.g. 2 hours and stops it after 7).

/What object are you creating?

Have you read the help file, specifically about time commands, run commands, and task commands?

Does the BitComet help file offer any help about BitComet commands?

Lets see what you have tried so far and maybe someone can offer more hints...

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi everybody. I have a ploblem with sysmon.ocx. Here is the sample:

GUICreate("Form1", 629, 472, 193, 115)
$Obj1 = ObjCreate("Sysmon.3")
$Obj1_ctrl = GUICtrlCreateObj($Obj1, 150, 16, 300, 200)
$obj1.ShowLegend = 0
GUISetState(@SW_SHOW)
while 1
    sleep(100)
wend

It works nice, but when i try to add some string to set up the counter "processor time" like this:

GUICreate("Form1", 629, 472, 193, 115)
$Obj1 = ObjCreate("Sysmon.3")
$Obj1_ctrl = GUICtrlCreateObj($Obj1, 150, 16, 300, 200)
$obj1.ShowLegend = 0
$obj1.Counters.Count.Value = 1
$obj1.Counter00001.Path="\Processor(_Total)\% Processor Time" ;<<<<
GUISetState(@SW_SHOW)                                                         
while 1
    sleep(100)
wend

script crashes with error.

F:\scripts\sysmon.au3 (5) : ==> The requested action with this object has failed.:

$obj1.counters.Counter00001.Path.value="\Processor(_Total)\% Processor Time"

$obj1.counters.Counter00001^ ERROR

Theese properties i took in MSDN library

Would anybody help me with this?

Edited by Axel82

Share this post


Link to post
Share on other sites

Already understood. RTFM - is a good rule.

$sa="\Processor(_Total)\% Processor Time"
$Obj1.Counters.add($sa)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0