View Single Post

Member Since: Oct 03, 2012
Location: WV
Posts: 30
dhmmjoph is on a distinguished road
Mac Specs: 2012 Mac Mini 2.5ghz OSX 10.10; Black MacBook (late 2006) OSX 10.6.8

dhmmjoph is offline
I am fairly new to applescript and very new to xcode, so excuse me if my question has a really obvious answer that I haven't been able to find for some reason.

I am writing an app in applescript to perform various tasks based on commands entered by the user. The idea is that there's a text field into which the user types a command. When they hit return, the app does something (e.g. 'email' opens mail, 'sqrt' finds the square root of a number, etc.)

I am using xcode to write this app and have successfully linked a text field to an action (type anything in the field, hit return, and a dialog comes up. I want to set the thing that is typed in the text field as a variable so that it becomes the command. I have googled extensively and found how to do it in xcode 3.x, but that code doesn't work in xcode 4.5. I also tried asking in the IRC Channel #xcode, but no one seems to be responding there. I thought this would be a fairly simple thing to do, but apparently it isn't.

How do I do this?

Thanks in advance for your help.
QUOTE Thanks