Questions tagged [applescript-objc]

AppleScriptObjC is a framework that allows Cocoa applications to be written in AppleScript. It obsoletes AppleScript Studio as of Mac OS X 10.6.

274 questions
2
votes
1 answer

How to make dialogue box in apple script to wait until user gives in put

I am trying to get a dialogue box in mac using apple script. tell application "System Events" activate display dialog "Enter your name: " default answer "" buttons {"OK"} default button "OK" with title "Good Name" set the Name to…
Maha Laxmi
  • 108
  • 1
  • 7
2
votes
2 answers

Creating a simple menubar app using Applescript

I am trying to create a menubar app in OS X Yosemite that simply consists of a dropdown menu with submenus. This menu and its submenus would be populated by an applescript script. I have found tutorials on something similar before, but they all…
2
votes
1 answer

How to get the value of a check box in ApplescriptObjC

I'm trying to get the value of a check box in ApplescriptObjC. on goClicked_(sender) set checkBoxValue to checkBox's stringValue as boolean end goClicked_ This code doesn't work. Any ideas?
James
  • 213
  • 1
  • 3
  • 13
2
votes
1 answer

Save a user popup selection in a custom Automator Action

Using Xcode 5.* for a cocoa-applescript automator action. Interface is a a simple popup menu that gets populated using an outlet with: tell thePopupMenu to removeAllItems() tell thePopupMenu to addItemsWithTitles_(theList) When the action is used…
jweaks
  • 3,674
  • 1
  • 19
  • 32
2
votes
1 answer

Applescript: asking the Finder from ApplescriptObjC?

This one-line Applescript works fine on my Mac: tell application "Finder" to open POSIX file "/Development/Applescript/Rapport.docx" However it fails from a trivial ApplescriptObjC project: on applicationWillFinishLaunching:aNotification --…
Jean-Denis Muys
  • 6,772
  • 7
  • 45
  • 71
2
votes
1 answer

Timeout has no effect in NSAppleScript

I have a simple apple script as follows: tell application id "com.adobe.InDesign" set sel to selection end tell This script is executed fine, but when the InDesign displaying Save Confirm Dialog, if I execute the script, It waits for 2 minutes…
mh taqia
  • 3,506
  • 1
  • 24
  • 35
2
votes
1 answer

AppleScript Syntax a real number can't go after this real number?

I have the following line in an AppleScript project: set script_path to "/tmp/usbmuxd-1.0.7/python-client" When I try to compile, it highlights the 1.0.7 and gives up this message: What does this mean?
Danijel-James W
  • 1,356
  • 2
  • 17
  • 34
2
votes
1 answer

Apple script for plist modify not working in MacOS mavericks

I just updated my Mac OS to Mavericks and stuck in a issue in my project. I an updating localization key in plist with apple script. But when I set the localization key plist file goes to 0 KB. It was working in Mac OS 10.8. Below is my script to…
Piyush Hirpara
  • 1,279
  • 1
  • 11
  • 29
2
votes
1 answer

How to use Objective C in an AppleScript-Cocoa Application?

I am developing an Applescript application using X-Code and I'm having the hardest time finding answers to questions. It's tough because I'm struggling to understand how the UI elements work, etc., and most answers to those questions are written in…
Jason Galuten
  • 1,042
  • 2
  • 11
  • 20
2
votes
1 answer

How to create a button in Outlook Mac 2011 programmatically?

I want to create a button to list all the alternative Email accounts in Outlook Mac 2011. I know that we can't use plug-ins in Mac Outlook and also certain limited functionality can be done using AppleScript. Can anyone please guide me on how to add…
Abhi
  • 63
  • 5
2
votes
1 answer

@autoreleasepool in AppleScriptObjc with ARC

I want to make an autoreleasepool in AppleScriptObjc with ARC, but I couldn't retain it. Here's the code: property NSAutoreleasePool : class "NSAutoreleasePool" script AppDelegate ... on buttonClicked_(sender) set pool to…
subdiox
  • 387
  • 2
  • 14
2
votes
2 answers

Retrieve list of selected files from active finder window using NSAppleScript

Does any one know how I could retrieve a list of selected files from the active finder window? I have no experience at all with AppleScript and your help will be appreciated! I tried using the following code from another answer on SO, but I could…
Shumais Ul Haq
  • 1,427
  • 1
  • 15
  • 26
2
votes
1 answer

Pass Variable or String from OS X Cocoa App to Applescript

I would like to pass a variable to applescript. For example, I type some words in textfield of a Cocoa-App (not cocoa-applescript app).Then, it will be a variable in Applescript for future use. I use Applescript to tell some software to run some…
user2152814
  • 257
  • 1
  • 7
  • 17
2
votes
1 answer

Expected end of line, etc. but found unknown token.- AppleScript Editor

The scenario is , I'm going to pass some text to the LabelWriter Printer .. Its a sample for checking. But at compile time itself getting error. tell application "AppleScript Runner" OPEN “COM1:9600,n,8,1” FOR OUTPUT AS #1 PRINT #1, “HELLO…
Kumar KL
  • 15,315
  • 9
  • 38
  • 60
1
vote
1 answer

"POSIX file" works in Applescript Editor, not in XCode

Try this: Make a new XCode4 Applescript project. In the delegate, paste this code: on doIt_(sender) set goodHFSLoc to (path to desktop folder) set test1 to (POSIX path of goodHFSLoc) log "test1:"&test1 set theJSPath to…
Dave Hirsch
  • 197
  • 13
1 2
3
18 19