applescript

How to use a sidebar with AppleScript?

喜夏-厌秋 提交于 2020-05-17 08:13:36
问题 I would like to know how I can create a window with the sidebar, basically what I want is a sidebar that will open some windows by clicking on a name, as in the example below, thanks in advance. 回答1: Ok, here are the steps for setting up a sidebar in an Xcode AppleScript app. I'm just showing functionality; I'll leave beautification for you to play with. First (obviously), set up the GUI. Open MainMenu.xib, and add three items from the object library: A Table View in the left side of the

How to use a sidebar with AppleScript?

强颜欢笑 提交于 2020-05-17 08:06:11
问题 I would like to know how I can create a window with the sidebar, basically what I want is a sidebar that will open some windows by clicking on a name, as in the example below, thanks in advance. 回答1: Ok, here are the steps for setting up a sidebar in an Xcode AppleScript app. I'm just showing functionality; I'll leave beautification for you to play with. First (obviously), set up the GUI. Open MainMenu.xib, and add three items from the object library: A Table View in the left side of the

Java Notarization of libAppleScriptEngine.dylib failing with The binary uses an SDK older than the 10.9 SDK

谁都会走 提交于 2020-05-16 19:15:01
问题 End of 2019 I had basic notarization of my Java 8 application working, on February 2020 Apple tightened the rules regarding notarization and this stopped my application from being notarized. Since I needed to move to Java 11 anyway I switched to Java 11 as I understood that this could be notarized ok and made necessary code changes but still having some problems. Specifically there is an option in my application to communicate with Apple Music app (formerly iTunes) using Applescript to

Java Notarization of libAppleScriptEngine.dylib failing with The binary uses an SDK older than the 10.9 SDK

纵然是瞬间 提交于 2020-05-16 19:12:50
问题 End of 2019 I had basic notarization of my Java 8 application working, on February 2020 Apple tightened the rules regarding notarization and this stopped my application from being notarized. Since I needed to move to Java 11 anyway I switched to Java 11 as I understood that this could be notarized ok and made necessary code changes but still having some problems. Specifically there is an option in my application to communicate with Apple Music app (formerly iTunes) using Applescript to

Turn list into applescript array

余生长醉 提交于 2020-05-15 08:36:05
问题 I have an applescript function which processes each item of an array. I'm looking for a way to drop a list like the following into my applescript file: arrayitem1 arrayitem2 arrayitem3 and to use applescript to automatically format it into the proper applescript array syntax so I end up with this: set array1 to {"arrayitem1", "arrayitem2", "arrayitem3"} As you can imagine, for longer arrays it would be a hassle to manually add all the commas and quotations. Thanks! 回答1: set stringofitems to "

Making Cocoa Application Scriptable Swift

梦想与她 提交于 2020-05-10 18:52:22
问题 Goal I am trying to make my Cocoa Application that has been written in Swift scriptable from Applescript. What I've Done I have created a SDEF file, configured my info.plist and created a class which I think is appropriate. definition.sdef <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd"> <dictionary title="SamX"> <!-- specific suite(s) for the application follow... --> <suite name="SamX Scripting Suite" code="Samx" description

Making Cocoa Application Scriptable Swift

▼魔方 西西 提交于 2020-05-10 18:46:15
问题 Goal I am trying to make my Cocoa Application that has been written in Swift scriptable from Applescript. What I've Done I have created a SDEF file, configured my info.plist and created a class which I think is appropriate. definition.sdef <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd"> <dictionary title="SamX"> <!-- specific suite(s) for the application follow... --> <suite name="SamX Scripting Suite" code="Samx" description

Use AppleScript To Parse XML Via A URL

倾然丶 夕夏残阳落幕 提交于 2020-04-30 06:26:35
问题 I am trying to parse data from a networked media player. I can access the data on the player via the following endpoint: http://192.168.10.2:8008/GetUserVars This returns the following data:- <?xml version="1.0" encoding="UTF-8"?> <BrightSignUserVariables> <BrightSignVar name="CurrentLetter">W</BrightSignVar> <BrightSignVar name="CurrentUserName">&Q&W&Q&W&Q&W&Q&W</BrightSignVar> </BrightSignUserVariables> From this I need to use AppleScript to get the values from the BrightSignVar XML element

com.automator.runner.xpc is not allowed assistive access - cannot click when running a quick action

拟墨画扇 提交于 2020-04-16 03:18:29
问题 I have a Quick Action that runs an AppleScript program which needs to click a button. However, when it gets to the clicking stage, it displays an error message: com.automator.runner.xpc is not allowed assistive access I've tried to give it permissions under System Preferences > Security and Privacy > Full Disk Access, but it only lets me add applications to the list, whereas this is a Quick Action (service). tell application "System Events" tell process "NotificationCenter" click button "End"

com.automator.runner.xpc is not allowed assistive access - cannot click when running a quick action

拜拜、爱过 提交于 2020-04-16 03:18:28
问题 I have a Quick Action that runs an AppleScript program which needs to click a button. However, when it gets to the clicking stage, it displays an error message: com.automator.runner.xpc is not allowed assistive access I've tried to give it permissions under System Preferences > Security and Privacy > Full Disk Access, but it only lets me add applications to the list, whereas this is a Quick Action (service). tell application "System Events" tell process "NotificationCenter" click button "End"