This code is obviously not the prettiest thing right now but I will change that later…
My problem is that the shell script I am using works fine in apple script but when I transfer it over to AppleScriptObjC it runs until the shell part and then just freezes the program.
Anyone have any ideas why? My .xib is correct so that is not the problem.
script SimpleAppAppDelegate
property parent : class "NSObject"
-- IBOutlets
property phoneNumber : missing value
property messageSubject : missing value
on buttonClick_(sender)
set qChar to ASCII character 34
set numberX to phoneNumber's stringValue()
set subjectX to messageSubject's stringValue()
(choose from list {"AT&T", "Sprint", "T-Mobile", "Verizon", "US Cellular"} ¬
with prompt "What is their carrier")
set carrierW to result as text
if carrierW = "AT&T" then
set carrierX to "txt.att.net"
else if carrierW = "Verizon" then
set carrierX to "vtext.com"
else if carrierW = "Sprint" then
set carrierX to "messaging.sprintpcs.com"
else if carrierW = "T-Mobile" then
set carrierX to "tmomail.net"
else if carrierW = "US Cellular" then
set carrierX to "email.uscc.net"
end if
do shell script "mailx -s " & qChar & subjectX & qChar & " " & numberX & "@" & carrierX
end buttonClick_
on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
end applicationWillFinishLaunching_
on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits
return current application's NSTerminateNow
end applicationShouldTerminate_
end script