Re: need help to make reminder
Posted: 02 May 2016, 19:32
Thanks for the response bro. It did solve my prob. You are right on what you have said about wolf's. It did reappear again and again with 1000 set on timer after pressing the ok button. I am very grateful to you. But one thing i am afraid of the 60000 timer is when i execute the script less than a minute before 20, it will miss the time i have set.Exaskryz wrote:The MsgBox was appearing like that because you didn't put a Block with the If statement. Use of { and } are necessary if you want more than one line to be executed only when the if statement is true.neosickle wrote:
I tried to put gui in the script. I also put ok button into it. The size of the gui is perfect than msgbox gives for me. But the problem is when i execute the script it displays the message instantly, the gui must appear only as i indicated in my script and when i press the ok button nothing happens. It must close the window after pressing ok. Pls help. Here's what i have done.
Code: Select all
#Persistent SetTimer, CheckTime, 60000 CheckTime: If (A_Min = 00) OR (A_Min = 20) OR (A_Min = 40) Gui +AlwaysOnTop Gui, Add, Text, Center, Audit na! Gui, Add, Button, Default, OK Gui, Show Return
However, you may find this is a bit problematic, because it will add the Text and Button controls repeatedly. While technically you have this in the auto-execute section, I'd suggest moving it above the label. I suggest having only the Gui, Show associated with the If statement - you also won't need a Block in that situation.
Now, that suggestion I have is what wolf's code demonstrates. It should be working; I see no reason it shouldn't be. It would be problematic though because it will actually be checking too frequently; wolf changed his timer to 1000 instead of 60000, which means that the GUI may reappear within the exact same minute after you dismiss it. So I'd suggest he put the timer back on 60000.
I executed wolf's code, and that's the behavior I got actually. A GUI that kept showing itself. With the timer on 60000 (or using the maths I originally suggested), you could have that problem resolved.