AppleScriptObjC is a framework that allows Cocoa applications to be written in AppleScript. It obsoletes AppleScript Studio as of Mac OS X 10.6.
Questions tagged [applescript-objc]
274 questions
0
votes
2 answers
Disappearing text field placeholders
I'm having this issue where my text field placeholders are disappearing when I run the app.
The is what it looks like in the Interface Builder:
This is what you see when the app runs:
Edit: Just to clarify, this is an AppleScript project. Little…

Keir
- 111
- 2
- 6
0
votes
3 answers
Set the origin of newly created window Cocoa/Applescript
I'm trying to create new window with given origin in Cocoa/AppleScript type application.
I have Main NIB with main window and another one called hud. With button in main window I open new window (hud) in that way:
set winn to NSWindowController's…

otakon
- 25
- 4
0
votes
2 answers
AppleScript: multiple buttons in "choose from list"
I have a script which makes users choose from different options in a list. I want there to be three buttons; OK, Cancel and Help (display a dialog with guidance).
However, it seems that I cannot use the "buttons" parameter within a list.
So how do…

Atle
- 27
- 1
- 6
0
votes
2 answers
How to get image and track name of Spotify app using AppleScriptObjC
I'm creating a new cocoa app using the Cocoa Applescript in Xcode and i want to get the track details from spotify as to render the image in my app. I created a simple window with two button next and prev with 2 text labels for artist name and track…

Muhammad Syahman
- 3
- 2
0
votes
0 answers
Accessing Contacts in AppleScriptObjC: "Application isn't running" error
tell application "Contacts"
set allPeople to every person
end tell
When my program reaches this part of the code, it crashes with the error "Contacts got an error: Application isn't running (-600)." It's definitely running. I have the Contacts…

mdl00
- 11
- 3
0
votes
1 answer
Cannot set outlook message body on compose mode using appleScript
I am trying to get and set outlook message body on compose mode.setting value does not work. is something wrong with script ?. but get value is working fine.
activate application "Microsoft Outlook"
tell application "System Events"
tell process…

DevÁsith
- 1,072
- 12
- 38
0
votes
0 answers
Display time stamp and save the screenshot in iphone memory
set dFolder to "~/Desktop/tcapture/"
set theCurrentDate to current date
do shell script ("mkdir -p " & dFolder)
set i to 0
repeat 1 times
do shell script ("screencapture " & dFolder & "fr-" & i & theCurrentDate &".tiff")
delay 10 --…
user1959030
0
votes
1 answer
How to store values even after the application restarts?
When creating applications with ApplescriptObjC you can create a property like this:
property myValue : "value"
However, if I change the value of this variable, it will get set back to "value" whenever the application restarts. How can I store…

James
- 213
- 1
- 3
- 13
0
votes
0 answers
Evernote and SBApplication bridge - createNoteWithENML issue - resources added twice
The problem:
//Create Evernote App SBApplication
EvernoteApplication *evernoteApp = [SBApplication applicationWithBundleIdentifier:@"com.evernote.Evernote"];
evernoteApp.delegate = self;
//Take this ENML Code
NSString *enml = @"
This is…

ilia510
- 903
- 7
- 15
0
votes
3 answers
Populate text field with variable and show text
Here's my code:
set todayDate to do shell script "date '+%Y/%m/%d'"
set salesRef to "COMPANY-AB" & "-" & theCustomerInitials & "-" & todayDate & "-" & theCustomerID
set the clipboard to salesRef as text
display dialog salesRef as text buttons…

Keir
- 111
- 2
- 6
0
votes
2 answers
Is it possible to know referrer for GURL call received via AppleScript event?
I have a protocol handler associated with my Cocoa application.
[[NSAppleEventManager sharedAppleEventManager]
setEventHandler:self
andSelector:@selector(getUrl:withReplyEvent:)
forEventClass:kInternetEventClass andEventID:kAEGetURL]; …

UncleMiF
- 1,051
- 2
- 11
- 20
0
votes
1 answer
AppleScript Objective-C is ignoring the "quit" keyword
In my code, I am running multiple functions that use the quit keyword. For some reason, when the code is compiled and ran, it seems to ignore the quit. The only way I can get it to work is if I use two quit's. Any ideas?
on checkadmin(username,…

Levi Muniz
- 389
- 3
- 16
0
votes
1 answer
Objective-C: How to remove multiple files with admin privileges?
I am trying to remove multiple files using apple script (given below) but it is not working and giving the following error:
Expected expression but found unknown token.
Here is my code:
{
///this string will be a contact of all the paths…

Vikas Bansal
- 10,662
- 14
- 58
- 100
0
votes
0 answers
How to use "AXSubrole", "AXRoleDescription" in applescript?
Can we use "AXSubrole", "AXRoleDescription" in applescript? If yes, what is the correct way? I tried following code.
-- open Excel -> VB Editor
tell application "System Events"
tell process "Microsoft Excel"
tell window 1
if…

Am33t
- 13
- 3
0
votes
1 answer
Apple Script working fine but with Objective C Library not getting expected out put
I tried running apple script
#! /usr/bin/osascript
do shell script "chmod 777 /Library/ColorSync/Profiles" with administrator privileges
It perfectly working in script editor and terminal. But not able to run with Objective C. Any help…

Govind
- 2,337
- 33
- 43