Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: How to create GUI for a perl script on MAC?/Apple Script and Perl?

by tobyink (Canon)
on Jan 18, 2013 at 07:25 UTC ( [id://1013968]=note: print w/replies, xml ) Need Help??


in reply to How to create GUI for a perl script on MAC?/Apple Script and Perl?

If you can persuade the Wx module to install on your system (WxWidgets does work on Mac, so it should theoretically, and according to the CPAN testers service there are successful install reports from Mac OS X), then you could investigate my Ask module. It's as simple as:

use Ask qw( file_selection info ); my $file = file_selection("Please choose a file!"); info("You chose: $file");

Then Ask does the rest. If the user has run your script through the Mac terminal, Ask should detect this, and to input and output via the terminal. If they've launched your script by, say, double clicking it in Finder, it will notice there's no terminal and interact with the user via dialog boxes.

I do keep meaning to write a blogs.perl.org post about Ask.

Update: blog post written... Ask not what your user can do for you...

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
  • Comment on Re: How to create GUI for a perl script on MAC?/Apple Script and Perl?
  • Download Code

Replies are listed 'Best First'.
Re^2: How to create GUI for a perl script on MAC?/Apple Script and Perl?
by karlgoethebier (Abbot) on Jan 19, 2013 at 09:44 UTC

    I don't know how often i failed to install Wx on different platforms...

    Last try:

    It's slightly annoying...

    Best regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

        I'm not using ActivePerl on my Mac.

        Anyway, at the provided link i see "The build failed on this platform...". Nothing new.

        And i'm not using citrusperl.

        I mentioned my OS as well as my perl version in my post.

        So i'm wondering how to get this things together.

        Thank you very much for any hint and best regards, Karl

        «The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1013968]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-24 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found