Posted by member 302889 on 2006-10-09 15:06:39
Hi all.
If i have three vars set in mzscript as follows...
SleepHrs
SleepMins
SleepSecs
...and i want to use the !LabelSetText bang to set the text of a label, what is the syntax i need to use to input those vars in the text. e.g....
*Script exec !LabelSetText SleepCounter "%{SleepHrs}:%{SleepMins}:%{SleepSecs}"
Is this a good guess? I'm having a few probs with my script and need to narrow down what the problem is and what it isn't. If i knew this piece of code was correct or incorrect it would help me a lot.
I'm making a sleep function for my theme so you can set the time before the PC shuts down e.g. 5 mins, 30 mins, 3 hours etc but i need to be able to update the display with an accurate time reading. i have made a nice wee script to continually pause for 1000 milliseconds and then to calculate the values of each part of the time, hours, minutes and seconds and just need to get the display part sorted. When the counter reaches zero, the PC should then shutdown.
I'm basing this code on an example i got from the Obsidian theme which was created by Immortal and Norman Bates. Cheers guys!!!
Any help would be appreciated.
Cheers all.
John
If i have three vars set in mzscript as follows...
SleepHrs
SleepMins
SleepSecs
...and i want to use the !LabelSetText bang to set the text of a label, what is the syntax i need to use to input those vars in the text. e.g....
*Script exec !LabelSetText SleepCounter "%{SleepHrs}:%{SleepMins}:%{SleepSecs}"
Is this a good guess? I'm having a few probs with my script and need to narrow down what the problem is and what it isn't. If i knew this piece of code was correct or incorrect it would help me a lot.
I'm making a sleep function for my theme so you can set the time before the PC shuts down e.g. 5 mins, 30 mins, 3 hours etc but i need to be able to update the display with an accurate time reading. i have made a nice wee script to continually pause for 1000 milliseconds and then to calculate the values of each part of the time, hours, minutes and seconds and just need to get the display part sorted. When the counter reaches zero, the PC should then shutdown.
I'm basing this code on an example i got from the Obsidian theme which was created by Immortal and Norman Bates. Cheers guys!!!
Any help would be appreciated.
Cheers all.
John