Welcome to MacForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Automatic timing

 
   Macintosh computer (Home) -> Hypercard RSS
Next:  History Channel "Jobs/Wozniak" Ad  
Author Message
Jamie Leclerc

External


Since: Aug 11, 2004
Posts: 1



(Msg. 1) Posted: Wed Aug 11, 2004 6:48 pm
Post subject: Automatic timing
Archived from groups: comp>sys>mac>hypercard (more info?)

I have the basic digital clock set on one card and I want it to break
away to another stack at specific times for rolling announcements.
How can this be done??? Please help :)

 >> Stay informed about: Automatic timing 
Back to top
Login to vote
Mark Schonewille3

External


Since: Jun 20, 2004
Posts: 40



(Msg. 2) Posted: Thu Aug 12, 2004 10:22 am
Post subject: Re: Automatic timing [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Jamie,

I suppose you have a script like this, somewhere:

on idle
if fld "Digital Clock" is not the short time then
put the short time into fld "Digital Clock"
end if
pass idle
end idle

You could adjust it as follows:

on idle
if fld "Digital Clock" is not the short time then
put the short time into myTime
put myTime into fld "Digital Clock"
if myTime is "13:00" then
makeAnnouncement
end if
end if
pass idle
end idle

The above script puts the time into a field if it is different
from the current time and executes another handler if the time
equals "13:00". By putting the time into a variable first, we
make sure that it will also work with seconds (the long time).

The handler to be executed could be:

on makeAnnouncement
go stack "Announcements" in new window
put "Welcome back from lunch!" into fld 1
end makeAnnouncement

I hope this helps to get you started.

Best,

Mark


Jamie Leclerc wrote:
 > I have the basic digital clock set on one card and I want it to break
 > away to another stack at specific times for rolling announcements.
 > How can this be done??? Please help :)

--

eHUG coordinator
<a style='text-decoration: underline;' href="http://home.wanadoo.nl/mark.sch" target="_blank">http://home.wanadoo.nl/mark.sch</a>
<a style='text-decoration: underline;' href="http://www.ehug.info" target="_blank">http://www.ehug.info</a><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Automatic timing 
Back to top
Login to vote
DunbarX

External


Since: Jul 26, 2003
Posts: 18



(Msg. 3) Posted: Sun Aug 15, 2004 7:22 pm
Post subject: Re: Automatic timing [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Sure. Just read the clock with an idle handler, which runs continuously when
you are not actually running some other handler. This, I assume is the case
most of the time.

So, if you had a field named "timeData" with a list of times and a handler
associated with those times, like:

12:00 AM doThis
12:30 PM doThat

Then you could (untested, just for the idea...)

on idle
get fld "timeData
repeat with y = 1 to the number of lines of it
if the short time = word 1 of line y of it then
wait 61seconds
do last word of line y of it
end if
end repeat
end idle

Believe me, there are about 53 ways to do the same thing, and 9 ways to shorten
even this script.

You may want to change the time format, depending on how accurate you need to
be. Note that using the short time gives a one minute window where the handler
might be invoked. That's why I waited a whole minute before executing, so that
only one doWhatEver would be executed at that time. However short your handler
is, it would be 12:01 the next time the idle handler checked.

Keep asking if you need more...
 >> Stay informed about: Automatic timing 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Anybody feel like doing a Runtime Revolution build? - I've got a demo/student/whatever licensed version of Runtime Revolution, which means I can only do builds for Macs. That's fine, but I'm curious to see how (or even if) this project works under Windows. The file is at http://just-john.com/cn/AArev.zi...

DIFfersifier 3.0 beta release - Hello, Today, the first beta release of DIFfersifier 3.0 has been completed. DIFfersifier is a conversion utility for HyperCard, MetaCard and Revolution stacks. It converts stacks to a number of different formats, including the Data Interchange..

ANN: European HyperCard User Group - Hello, The European HyperCard User Group (eHUG) has released a newsletter. The newsletter contains a brief introduction to eHUG, an announcement of the video conference to be held on Wednesday 23rd July and a few remarks about the Apple Expo 2003 Paris....

Where can I get it? - Hallo all, I just recently got an old imac, and whilst stareing at it debateing on what to do with it, (besides learnin the frigin things lol) I remembered HyperCard, I miss it alot, and would love to locate a copy, (Of course I mean "borrow") ...

WindowScript-Royal Software - I have Windowscript 1.5 and am interested in upgrading to the latest version. I tried to go to the Royal Software website but it doesn't seem to exist any longer on my server. Have they gone out of business? Anyone know where I can contact them or..
   Macintosh computer (Home) -> Hypercard All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]