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
3
votes
1 answer

"Can't Get Document" Error - Javascript & Applescript

My Applescript has been encountering this error (sporadically) in Safari. Result: error "Safari got an error: Can’t get document \"DOC TITLE\"." number -1728 from document "DOC TITLE" I assumed this was because the page wasn't loaded, but I…
pianoman
  • 815
  • 2
  • 16
  • 36
3
votes
3 answers

Is there a way to package bash shell scripts with AppleScriptObjC app on MacOSX with Xcode?

I am trying to automate three or four bash shell scripts using AppleScriptObjC as a wrapper. This will give me a friendly gui front end to select data files etc., and the convenient text file manipulating and processing of several bash scripts. …
3
votes
1 answer

Calling multiple arguments from objective-c to applescript-objc

I have a applescript-objc script with a method as follows :- on say_(phrase, userName) set whatToSay to "\"" & phrase & " " & userName & "\"" say whatToSay end say_ And i want to call this method from objective-c but cant seem to figure out…
3
votes
3 answers

How to register a Cocoa-Applescript application as a URL handler? (equivalent of "on open location" in Applescript Studio)

Should be relatively straightforward, but I can't seem to find anything on this - I'm trying to add a URL handler to a Cocoa-Applescript application, as described here: http://www.macosxautomation.com/applescript/linktrigger/index.html Except that…
dsmudger
  • 3,601
  • 1
  • 17
  • 18
3
votes
1 answer

Autocomplete/suggest functionality in an applescript input box

I am trying to build an applescript dialog that helps me keep track of the things I am working on. To make it really effective I'd like to have it look up items from my todo list and suggest them as I type a la google suggest or other javascript…
Mike
  • 35
  • 3
3
votes
2 answers

XCode / AppleScriptObjC Newbie

I'm brand new to the world of Xcode 4.4 and AppleScriptObjC. I'm trying to expand and experiment with a tutorial on AppleScriptObjC in the book "Learn AppleScript" by Sanderson and Rosenthal, and I've run into a problem. The code: property parent…
2
votes
1 answer

Change Applescript into single line NSApplescript source

Im building an app for learning purposes of using applescript to send multiple commands during an action. Below is the code I'm messing with but I have stripped out the actions in between the "" and replaced them with numbers. Everything works fine…
Kyle
  • 187
  • 2
  • 11
2
votes
1 answer

Problem with date picker showing (main thread issue?)

Working with an AppleScript file from https://github.com/bat-tomr/dialog-node ... # 06/04/16 09:35:02 # Author: Shane Stanley # Adapted by Christopher Stone use AppleScript version "2.4" use scripting additions use framework "Foundation" use…
Brett Zamir
  • 14,034
  • 6
  • 54
  • 77
2
votes
1 answer

Store AppleScript object in NSMutableDictionary

As part of an automation workflow I'd like to be able to store a reference to an applescript object inside an NSMutableDictionary. This is done, in effect, to be able to use variable variable names. Keeping an NSAppleScript instance alive, I'd then…
Max Snijders
  • 374
  • 2
  • 10
2
votes
1 answer

Unrecognized Selector in Swift/Objective-C/Applescript project

I'm getting the following message when running this simple ASObjc program interfaced with Swift: *** -[ASMyObject foo:]: unrecognized selector sent to object The code works as…
user3225395
  • 581
  • 6
  • 23
2
votes
1 answer

Facebook in a Mac App

how would I integrate Facebook into my Mac Application. I could give Objective-C a bit of a go, but it's going to be in an AppleScript-Objective-C project. I could.. update the user's status a bit better instead of just opening their web browser and…
Seb Jachec
  • 3,003
  • 2
  • 30
  • 56
2
votes
1 answer

Parse NSAppleEventDescriptor in AppleScriptObjC

I am trying to write an AppleScript application for the Automator to manipulate Contact groups. I am receiving a contact item as input to the script but I'm stuck at how to parse it. Here's the source I've written so far: script…
2
votes
1 answer

Applesricpt how to move files to /Library/Caches

I am working on a applesript code that allows users to customize the background of there login/change user screen. I am using basic applescript ui at the moment but hope to implement more advanced applescript-objC UI if this is a sucsess. At the…
2
votes
1 answer

Asynchronously "do shell script" in Cocoa-Applescript?

I am new to Cocoa and AppleScript. Recently I want to do something via the "do shell script" command in Cocoa-AppleScript many times, and show a window with a progress bar at the same time to indicate how many times I've done. My code looks like…
2
votes
1 answer

Apple script getting Syntax error - Error: Expected end of line, etc. but found “"”

#! /usr/bin/osascript osascript -e "do shell script "chmod 777 /Library/ColorSync/Profiles" with administrator privileges" Error: Expected end of line, etc. but found “"”. I am new to apple script. I need to run this with NSAppleScript. AS first…
Govind
  • 2,337
  • 33
  • 43
1
2
3
18 19