Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved How to use %v parameter?
#1
I know it's possible to pull a sensor value with the %v perameter as per this thread: http://www.hwinfo.com/forum/Thread-senso...t+variable


What I'm wondering is how that happens? I'm using an app called mailsend to send me an email/text when my server gets hot, but I can't seem to get it to spit out how hot it is.
Here's my code sofar:
Code:
c:\mailsend.exe -to [email protected] -name "%COMPUTERNAME%" -from [email protected] -starttls -smtp mymailserver.net -port 587 -sub " %COMPUTERNAME% TEMP WARNING %time%" -M "%COMPUTERNAME% temperature threshhold (60C) was exceeded on: %date% %time% Current Temperature is %v " +cc +bc -q -auth-plain -user "myusername" -pass "mypassword"

This does work, but the %v parameter doesn't fill, it just says "v"
Reply
#2
You have to use the "%v" in the Argument field specified in HWiNFO.
So if the whole code you posted is inside some external batch file, it won't work.
You will have to either enter "c:\mailsend.exe" as the command to be invoked and the rest of the code as command arguments in HWiNFO, or keep the entire code in an external batch file and from within HWiNFO call: "yourbatch.bat" with arguments "%v" and replace the "%v" in your batch file with "%1" - that's the first argument passed to your batch file.
Reply
#3
Ok, Thanks!
Having HWinfo pass the %v argument and pulling the %1 in place of the %v in my script worked great.

I expected it to work like an environment variable for some reason, I was obviously mistaken.
Reply
#4
Sorry for the confusion. This parameter is handled inside HWiNFO only.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)