Sign in to follow this  
Followers 0
arminius

reminder automatic shutdown

7 posts in this topic

ok I've written this scrip, and I windows scedule set to turn it on every day, it sees the date and if it's the right date it says you have car registration that needs to be renewed in a week, but if it's a day with nothing on I want it to turn itself on, count to about 5 seconds, go nope nothing on today and turn itself off.

but if there is a message pop up I would like it to stay on indefinitly until I click ok

here is the coding

CODE
While 1

If @HOUR=20 Then

MsgBox(262144, "Reminder", "The Time Is 8PM")

Exit

EndIf

If @HOUR=23 Then

MsgBox(262144, "Reminder", "The Time Is 11PM")

Exit

EndIf

If @HOUR=00 Then

MsgBox(262144, "Reminder", "The Time Is 12AM")

Exit

EndIf

If @HOUR=02 Then

MsgBox(262144, "Reminder", "The Time Is 2AM")

Exit

EndIf

If @HOUR=03 Then

MsgBox(262144, "Reminder", "The Time Is 3AM")

Exit

EndIf

If @HOUR=04 Then

MsgBox(262144, "Reminder", "The Time Is 4AM")

Exit

EndIf

If @HOUR=06 Then

MsgBox(262144, "Reminder", "The Time Is 6AM")

Exit

EndIf

Sleep(400)

WEnd

so as you can see, if it turns on at 8pm and I get home at 9AM the next morning I want the reminder to still say the time is 8PM, but if it turns itself on at 9PM, it checks, sees nothing is going on then turns itself off, saving processing power.

is this possible? I've tried a few things none worked

Share this post


Link to post
Share on other sites



can't understand the whole you mean, but

if it turns on at 8pm and I get home at 9AM the next morning I want the reminder to still say the time is 8PM, but if it turns itself on at 9PM, it checks, sees nothing is going on then turns itself off, saving processing power.

select
case @HOUR=20 then
$log=FileOpen("StartLog.txt",1)
FileWrite($log,@HOUR);write 20 in the StartLog.txt for read in the next 9AM
FileClose($log)

case @HOUR=21
if WinExists("Untitled -") then;check if some window with title "untitled -" exist
msgbox(64,"","chao buoi sang")
else
sleep(5000);sleep 5 secs
exit
endif

endselect

and ... use FileReadLine() to read StartLog.txt, it will stay 20


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

I got a

ERROR: syntax error

case @HOUR=20 then

for that coding sorry

Share this post


Link to post
Share on other sites

I got a

ERROR: syntax error

case @HOUR=20 then

for that coding sorry

ah , sorry, at first , i was going to use IF but i think select would be easier

case @HOUR=20

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

I'm sorry I know your trying to help, but I don't see how this coding you've done has anything to do with what the goal of the script is?

I can turn it off by clicking ok, I just want it to turn itself off if there is no relevant reason to activate a msgbox

Share this post


Link to post
Share on other sites

so what's the relevant reason to activate a msgbox ?


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

the correct time in which it's told to

if it's set to go of at say 2200 it get's turned on by the hourly scedule, see it's 2200 and displays the message

if it's any other time it goes nope nothing for me to do and turns itself off

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