in reply to Re: Re: Show a msgbox and do not wait (Win32)
in thread Show a msgbox and do not wait (Win32)

Win32::Daemon would be one possible solution. Write a short service script that checks a log file, pops a message box if there is text in there, then unlinks the file.

Then just write to the log file when you want to pop up a message and continue on in your main program. Have the service read the log every X seconds and send any pending messages. Use the fork in the service so the parent can continue 'listening' to the log while the kid(s) hang on the MsgBox(s).

If you want to get a little more elegant and complex have the service create and listen to a named pipe rather than using a text file for IPC. Win32::Pipe will let you create a named pipe with ease. All the clien has to do is open the pipe like you would open a file using the UNC syntax

open PIPE, ">\\\\server\\pipe\\MyNamedPipe" or die $! print PIPE $message CLOSE PIPE
and then print to it and close the pipe.

Hope this solves your problem.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print