C (299/304)

From:Allan Odgaard
Date:31 Aug 2000 at 21:19:07
Subject:Re: OS3/3.5 Workbench Test.

On 31-Aug-00, Colin Wenzel wrote:

> [...]
> Is there a SIMPLE way of getting a message port up to receive
> diskchange messages without opening a window in the first place...

ahh... I was just about to delete your letter, but then I finally
reached your actual question, which is quite simple -- it could even
have been in the subject ;-)

Actually, since your program is just a batch-file, use FKey (from
Workbench) or perhaps MCP, and setup your batchfile as an action to
execute, each time the hotkey 'DiskInserted' and/or 'DiskRemoved' is
activated...

You can also make your program a commodity and handle the hotkey
yourself. But I think you may have to add an extra cx hotkey broker to
get both diskinserted and diskremoved events, though this isn't that
hard, if you know about commodities... :-)

Regards Allan