Generate Live Date and Time Labels with Compiled Dialogs
Moderators: Dorian (MJT support), JRL
-
- Pro Scripter
- Posts: 70
- Joined: Wed Nov 08, 2017 6:54 pm
Generate Live Date and Time Labels with Compiled Dialogs
Is it possible to set the label text property with current time and have it be updated every minute without making the script run in a loop? Perhaps there is some kind of event or action script that would cover this task or if it was possible to update properties with another compiled macro which would essentially loop a GetTime> and then update the properties of a separate dialog running in another compiled exe? I doubt this is possible as it dont seem logical for one exe to affect anothers properties... Or am I wrong and this is possible?
-
- Pro Scripter
- Posts: 70
- Joined: Wed Nov 08, 2017 6:54 pm
Re: Generate Live Date and Time Labels with Compiled Dialogs
The mouse cursor would be moved at least three times per minute so perhaps there is a way to create a custom event handler to look out for the mouse moving and when it moves it runs a sub routine that checks the time and then updates the labels text property?
Any one know what such a script would look like?
Any one know what such a script would look like?
-
- Pro Scripter
- Posts: 70
- Joined: Wed Nov 08, 2017 6:54 pm
Re: Generate Live Date and Time Labels with Compiled Dialogs
Never mind guys I did it again trial and errored it out till I got something logical to work itself out..... Here is what I did to make it work for me on the basis that the mouse keeps moving....
Code: Select all
AddDialogHandler>Dialog1,,OnMouseMove,UPDATETIME
Show>Dialog1,res1
SRT>UPDATETIME
GetTime>CURRENTTIME
SetDialogProperty>Dialog1,TIME_LABEL,Caption,%CURRENTTIME%
TimeDiff>LAUNCHTIME,CURRENTTIME,M,RUNNINGTIMEMINUTES
If>RUNNINGTIMEMINUTES=%LASTRUNNINGTIME%
SetDialogProperty>Dialog1,RUNNING_TIME_LABEL,Caption,%RUNNINGTIMEMINUTES% Minutes
Endif
If>RUNNINGTIMEMINUTES={%LASTRUNNINGTIME%+1}
SetDialogProperty>Dialog1,RUNNING_TIME_LABEL,Caption,%RUNNINGTIMEMINUTES% Minutes
Endif
If>RUNNINGTIMEMINUTES={%LASTRUNNINGTIME%+100}
GetDialogProperty>Dialog1,MESSAGE_WINDOW,Text,OLDMSGS
SetDialogProperty>Dialog1,MESSAGE_WINDOW,Text,Running Time Error (Skipped)%CRLF%%OLDMSGS%
Endif
Let>LASTRUNNINGTIME=RUNNINGTIMEMINUTES
END>UPDATETIME
-
- Pro Scripter
- Posts: 70
- Joined: Wed Nov 08, 2017 6:54 pm
Re: Generate Live Date and Time Labels with Compiled Dialogs
Keep your spam out of this thread. Can admin please remove this spammer?
- Marcus Tettmar
- Site Admin
- Posts: 7380
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Generate Live Date and Time Labels with Compiled Dialogs
We seem to be fighting a losing battle. It's not enough to put in protection against bots in a day when it's cheaper for spammers to pay real people a few cents a post. So there's very little we can do to stop people signing up and posting spam, unless we moderate every post. We might have to start doing that which of course will ruin it for everyone else by slowing things down. At the moment I'm deleting spam posts, and people who spam, as soon as I see them.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Pro Scripter
- Posts: 70
- Joined: Wed Nov 08, 2017 6:54 pm
Re: Generate Live Date and Time Labels with Compiled Dialogs
Thanks for removing the spam message Marcus.