The documentation is clear on this, no bi-directional communication; see http://www.sveinbjorn.org/files/manpages/PlatypusDocumentation.html#812
That leaves you with a few workarounds;
- Use and expect script to inject your inputs;
- Update your script to take arguments, which is a feature supported by platypus;
- If you need to add more dynamic information, consider using a TK dialog to query for user input;
- On mac you can use an osascript to call a dialog with minimum code;
OSA Script Example
#!/usr/bin/env perl
use strict;
sub osascript($) { system 'osascript', map { ('-e', $_) } split(/\n/, $_[0]); }
sub dialog {
my ($text, $default) = @_;
osascript(qq{
tell app "System Events"
text returned of (display dialog "$text" default answer "$default" buttons {"OK"} default button 1 with title "$(basename $0)")
end tell
});
}
my $result = dialog("Life, the universe and everything?", "42");
