Page 1 of 1

Ability to do basic maths

Posted: Mon Dec 03, 2018 8:09 pm
by SimplyAName
Currently, I am trying to make a card which allows me to put my computer to sleep after a set amount of minutes.
I am trying to do the below as the command takes it in milliseconds but have found no way doing it without just saying the amount of millisecond which isn't the most fun math. So some ability to just do simple addition and multiplication etc would be awesome. Could have it set to only work in between two symbols to stop errors happening eg: ?24*100?
Copy of card having problem with maths
Copy of card having problem with maths
P2RCard.PNG (18.44 KiB) Viewed 3770 times
Thanks and great work so far. Can't wait to see it develop even further :D

Re: Ability to do basic maths

Posted: Tue Dec 04, 2018 7:07 am
by RobLatour
I haven't tested it (as I'm a little pressed for time right now), but you should be able to create a simple .bat file to do the math.

For example, create the file:
sleep.bat

and in it include the following (as per your example):

set /a Milli= %1 * 6000
e:
cd "My Downloads"
nircmd-x64.exe cmdwait %Milli% standby

and in the Push2Run card, open the sleep.bat file, remembering to put the $ in the parameters field on your push2run card.

Please let me know if this works for you.

Re: Ability to do basic maths

Posted: Tue Dec 04, 2018 10:24 am
by SimplyAName
A little bit of tweaking needed but work great overall thanks :D