Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / get date$() help!

Author
Message
Zeus
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 30th Jul 2006 18:34
I am trying to make something to where when you type in a thing to where when you type in a date and when it is that date it beeps, no matter if it is running. Please Help! Thank You!

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 30th Jul 2006 20:15 Edited at: 30th Jul 2006 20:16
so, enter a date:
when the date, obtained with get date$(), matches, start beeping
check this constantly, even if the program is not running?

Your program cannot compare the date you entered against the current date if it is not running!

You can use hide window, so it appears to no longer be running (but really it is), but then what if the user shuts down? Save it to a file on the hard drive and startitself up again when windows does? (There is no native DB command to launch itself on startup, or add itself to the startup list)
Zeus
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 31st Jul 2006 16:03
Here is What I tried:


But it won't beep, I tried the format 07/31/06
But it wont beep I even typed in today's exact date!
Is it the format?

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 31st Jul 2006 17:24 Edited at: 31st Jul 2006 17:25
Press Esc and access the CLI

type print get date$()

This will print to the screen, what your computer thinks the date is...

it would seem like your computer is getting the date wrong. However it could also be because you are hiding the window, for now, try removing the hide window line.

One thing you MUST do if you hide the window is make sure you have put the "Always active on" in before you reach the hide window line, otherwise your program just stops once it hides...
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 31st Jul 2006 18:52
First off, read the sticky about specifying DBC or DBP - we are not mind readers all the time.

Using DBPro it works quite happily;



If I enter 07/31/06 it gives correct message (assuming you run it today!)

Boo!
Zeus
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 31st Jul 2006 23:30 Edited at: 31st Jul 2006 23:30
I am using DBC and sounds and SimSmall's idea didn't work!
I have no idea! Wait......Okay I got it! Thanks u guys!

spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 31st Jul 2006 23:34
It is customary to let us know what you did to fix your problem, even if it was a stupid coding error. It may help others in the future if they search these forums.

Boo!
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 1st Aug 2006 04:42
Quote: "SimSmall's idea didn't work!"


I suggested several possible solutions...

Login to post a reply

Server time is: 2024-09-25 05:24:48
Your offset time is: 2024-09-25 05:24:48