From: | Rolf Max Rotvel |
Date: | 13 Jan 2000 at 01:23:23 |
Subject: | Re: (unknown) |
From: "Rolf Max Rotvel" <rolfr@worldonline.dk>
Hi Mike Cardwell. On Mon, 10 Jan 2000 12:08:18 +0000 you wrote:
> I'd like to write an arexx script that runs in the background from
> startup. I'd like it to do nothing, until a certain file exists on my
> hard drive. I currently have it checking for the file every one second,
> using the amiga dos command "Wait 1" Does anyone know a more efficient
> way of doing this?
The most elegant solution is to use rmh.library:
/*
** Notify test
*/
file = 't:test'
call addlib('rmh.library', 0, -30, 0)
/* Start filenotification */
id = rmh_startnotify(file)
/* Error starting notify */
if id < 0 then exit 10
/* Signal to wait for */
signal = rmh_notifysignal(id)
/* And wait...*/
rmh_wait(signal)
/* When script reaches here file has appeared or changed */
exit
Regards
Rolf
--------------------------- ONElist Sponsor ----------------------------
Hey Freelancers: Find your next project through JobSwarm!
You can even make money in your sleep by referring friends.
<a href=" http://clickme.onelist.com/ad/jobswarm1 ">Click Here</a>
------------------------------------------------------------------------
ARexx mailing list - No flames, no overquoting, no crossposting. Unsubscribe: Blank mail to mailto:arexx-unsubscribe@onelist.com