Lurch68b Posted August 20, 2015 Share Posted August 20, 2015 (edited) Hi all, This is something I was messing with a while back and I have searched for the answer but couldn't find anything that seemed to apply to what I am trying to do. Basically I have an in house program that can read and allow control of functions on a motherboard, fans and sensors. I can control the fans without issue, that was the easy part. Now I am trying to read back values like PWM, Temperature, ect. This is an example from the readme file. I tried to read the info from a DOS window but autoit doesn't see anything but the basic windows info.So the line as it looks now is this ShellExecute ("wcmdtool.exe" , "20 c0 14 0d 00" & $SEC00) What I am hoping with this line is that when I set the fan speed that I can read back from the register to validate that it was set to the right thing. To read the PWM output of a fan zone:wcmdtool 20 c0 14 0d #1 00where #1 is the fan zonethe fifth column of the output is the fan PWM in HEXThis is probably not going to work the way I want it to work but there it is. Fan_Speed_Test2.au3 Edited August 20, 2015 by Lurch68b Link to comment Share on other sites More sharing options...
JohnOne Posted August 21, 2015 Share Posted August 21, 2015 look at example for stdoutread AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Lurch68b Posted August 21, 2015 Author Share Posted August 21, 2015 (edited) Thank you John, I probably should have also included the output of that command as well. I only need the last value 20 c0 14 0d 01 00 20 C4 14 00 (17) So if I set 41 or 17 or 1A that is what I should be able to read back from the controller. I guess I would need to parse it or some such thing? So this is what I tried #include <constants.au3>Local $foo = Run(@ComSpec & "wcmdtool.exe" ,"20 c0 14 0d 00", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)Local $LineWhile 1 $Line = StdoutRead($foo) If @error Then ExitLoop MsgBox(0, "STDOUT Read;)", $Line)WEndWhile 1 $Line = StdoutRead($foo) If @error Then ExitLoop MsgBox(0, "STDOUT Read;)", $Line)WEnd I will go out and dig around for examples for StdoutRead now. Edited August 21, 2015 by Lurch68b Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now