Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by karlgoethebier (Prior)
on Jan 21, 2013 at 09:41 UTC ( #1014416=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to create GUI for a perl script on MAC?/Apple Script and Perl?
in thread How to create GUI for a perl script on MAC?/Apple Script and Perl?

This snippet reads a option, does the backgrounding and reads the pid of the current perlscript for killing it...

set theWindowTitle to "PerlMonks" set theOption to text returned of (display dialog "Enter a sourceFolde +r:" & return default answer "" with title theWindowTitle) set thePerlscript to quoted form of (POSIX path of ((choose file with +prompt "Select a script:") as Unicode text)) set cmd to thePerlscript & " -S " & theOption & " &> /dev/null" & " & + echo $!" display dialog "Command: " & cmd with title theWindowTitle do shell script cmd set pid to the result display dialog "PID: " & pid with title theWindowTitle display dialog "Kill the proccess (" & pid & ")" buttons {"OK"} with t +itle theWindowTitle do shell script ("kill " & pid)

I hope this helps a little bit to work it out...

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

  • Comment on Re^3: How to create GUI for a perl script on MAC?/Apple Script and Perl?
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014416]
help
Chatterbox?
[marto]: clever stuff
[Corion]: marto: Thanks for pointing me to Tinc - I found at least some article that suggests that what I want would be possible with Tinc. Now I can try that out :)
[marto]: I think you can do what you want without too much hassle, but yeah, please try and let me know if it works well :)
[marto]: sadly I've still not remembered the name of that x86 all in one we discussed
[Corion]: marto: Heh - I looked at the Intel things and they were all at EUR 80 or upwards, and that's a bit too much (or rather, for that money, I'd look for a NAS already)
[marto]: click bait marketing is making it harder to find stuff I can't remember based upon a few terms :(

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2018-01-17 15:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (201 votes). Check out past polls.

    Notices?