Generate Live Date and Time Labels with Compiled Dialogs

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
MadQuestion
Pro Scripter
Posts: 70
Joined: Wed Nov 08, 2017 6:54 pm

Generate Live Date and Time Labels with Compiled Dialogs

Post by MadQuestion » Wed Nov 15, 2017 11:40 pm

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? :?: :?: :?: :?: :?:

MadQuestion
Pro Scripter
Posts: 70
Joined: Wed Nov 08, 2017 6:54 pm

Re: Generate Live Date and Time Labels with Compiled Dialogs

Post by MadQuestion » Wed Nov 15, 2017 11:45 pm

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? 8) 8) 8)

MadQuestion
Pro Scripter
Posts: 70
Joined: Wed Nov 08, 2017 6:54 pm

Re: Generate Live Date and Time Labels with Compiled Dialogs

Post by MadQuestion » Thu Nov 16, 2017 12:21 am

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

MadQuestion
Pro Scripter
Posts: 70
Joined: Wed Nov 08, 2017 6:54 pm

Re: Generate Live Date and Time Labels with Compiled Dialogs

Post by MadQuestion » Tue Jan 30, 2018 3:01 am

Keep your spam out of this thread. Can admin please remove this spammer?

User avatar
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

Post by Marcus Tettmar » Tue Jan 30, 2018 10:19 am

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?

MadQuestion
Pro Scripter
Posts: 70
Joined: Wed Nov 08, 2017 6:54 pm

Re: Generate Live Date and Time Labels with Compiled Dialogs

Post by MadQuestion » Wed Jan 31, 2018 10:07 pm

Thanks for removing the spam message Marcus.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts