Sign in to follow this  
Followers 0
ondrajka

Importing From Task Manager

3 posts in this topic

I am trying to import values from the network tab on the task manager. My code imports from the bytes received column. I can get a variable to equil the imported data in numbers but it is text and not a numeric value. i.e. $wire - 100 = -100 or $wire - $lan = 0 "failure" Anyone know how to import an actual numeric value? Or how to use something like _StringRegExpReplace to convert it.

$title = "Windows Task Manager"

$classDetails = "SysListView321"

$wire1 = ControlListView($title,"",$classDetails, "GetText",0,2)

$lan1 = ControlListView($title,"",$classDetails, "GetText",1,2)

Share this post


Link to post
Share on other sites



I am trying to import values from the network tab on the task manager. My code imports from the bytes received column. I can get a variable to equil the imported data in numbers but it is text and not a numeric value. i.e. $wire - 100 = -100 or $wire - $lan = 0 "failure" Anyone know how to import an actual numeric value? Or how to use something like _StringRegExpReplace to convert it.

$title = "Windows Task Manager"

$classDetails = "SysListView321"

$wire1 = ControlListView($title,"",$classDetails, "GetText",0,2)

$lan1 = ControlListView($title,"",$classDetails, "GetText",1,2)

If you mean that you read the value as text and you want it to be a number then you can use

$value = Number($textread)

But if the text is digits then you shouldn't need to worry, AuoIt can do this

$a = "123"
$b = "23"
$c = $a - $b;gives 100

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Thanks man. This helped get me in the right direction. Pointed me at what the real problem was. The commas.

If the imported value of $wire=2,599,999

MsgBox(0,"",$wire1)

$wire1 = Number($wire1)

MsgBox(0,"",$wire1)

The 1st box would read 2,599,999 and the 2nd 2

MsgBox(0,"",$wire1)

$wire1=StringRegExpReplace($wire1, ",", "")

MsgBox(0,"",$wire1)

The 1st box would read 2,599,999 and the 2nd 2599999

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