• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: XCode menu scripts question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode menu scripts question


  • Subject: Re: XCode menu scripts question
  • From: Tommy Nordgren <email@hidden>
  • Date: Fri, 4 Feb 2005 18:56:16 +0100

I'm wondering if it is possible to work around this problem by reading stdin to completion,
before generating and running the Applescript. Also, is'nt there a Tk widget set for Perl,
so that the dialog can be handled entirely within Perl?


Feb 4, 2005 kl. 5:37 PM skrev David Ewing:

Beware that if you ask Xcode 1.5 to run some AppleScript and you also have it piping input from the current file to stdin of your script, you can easily get it to hang. You're OK if Xcode only needs to send a small amount of data to the pipe. This is fixed for Xcode 2.0. You might be able to work around this by asking another app (like Finder) to display the dialog. Of course, that might not be so visually appealing. (And I haven't tried this approach myself.)

Dave

On Feb 4, 2005, at 1:27 AM, daniel wrote:



You could use AppleScript:

#!/usr/bin/perl
my $dialogAnswer = `osascript << EOT
tell application "Xcode"
return text returned of (display dialog "Enter text" default answer "input")
end tell
end
EOT`;
print $dialogAnswer . "\n";


On Feb 3, 2005, at 1:20 PM, Tommy Nordgren wrote:


Is it possible for a perl script associated with a XCode menu item to display a dialog asking for some input?

"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"


"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: XCode menu scripts question
      • From: David Ewing <email@hidden>
References: 
 >XCode menu scripts question (From: Tommy Nordgren <email@hidden>)
 >Re: XCode menu scripts question (From: daniel <email@hidden>)
 >Re: XCode menu scripts question (From: David Ewing <email@hidden>)

  • Prev by Date: Re: Rez not working
  • Next by Date: Re: Subversion server
  • Previous by thread: Re: XCode menu scripts question
  • Next by thread: Re: XCode menu scripts question
  • Index(es):
    • Date
    • Thread