in reply to Re^2: Win32::SysTray Issue ( Win32::GUI::DoEvents )
in thread Win32::SysTray Issue
Oh! That should be easy, although this code is untested:
# ... our $Tray = new Win32::SysTray ( ... ); # note that $Tray is global # ... my $name = Prompt("What is your name?"); print "\nHello $name\n\n"; # ... sub Prompt { my $prompt = shift; print "\n$prompt "; my $response = ''; my $rsel = ''; my $rrdy; vec($rsel,fileno(STDIN),1) = 1; CHAR: while (1) { die "user quit" if -1 == Win32::GUI::DoEvents(); while (select($rrdy=$rsel, undef, undef, 0.10)) { sysread(STDIN, $response, 1, length $response) == 1 or die "read error"; } last CHAR if chomp($response); } return $response; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Win32::SysTray Issue ( Win32::GUI::DoEvents )
by PilotinControl (Pilgrim) on Oct 21, 2020 at 01:14 UTC | |
by jcb (Parson) on Oct 21, 2020 at 01:23 UTC | |
by PilotinControl (Pilgrim) on Oct 21, 2020 at 02:15 UTC | |
by jcb (Parson) on Oct 21, 2020 at 21:08 UTC | |
|
Re^4: Win32::SysTray Issue ( Win32::GUI::DoEvents )
by PilotinControl (Pilgrim) on Oct 20, 2020 at 02:56 UTC | |
by jcb (Parson) on Oct 21, 2020 at 01:16 UTC | |
by PilotinControl (Pilgrim) on Oct 21, 2020 at 19:36 UTC |