Post

Replies

Boosts

Views

Activity

Apple Application Menu: "Quit <my application name>" event hanging
When going to the Apple Application menu (i.e. About, Services, Hide, Show All, Quit) and selecting "Quit ", it is causing my Java application to hang. It used to work but now I get the spinning wheel and the only way to close the application is to force quit it. Tried it on another system and it does the same thing. In debugging on the Java application side, this Quit operation does not trigger the main windowClosing() event. So, it is hanging the application somewhere upstream. Any ideas on where to check? My OSX is 11.6.2 Big Sur and Java version 16.0.1 2021-04-20.
Topic: UI Frameworks SubTopic: UIKit Tags:
3
0
469
Feb ’22
Apple Application Menu: "Quit <my application name>" event hanging
When going to the Apple Application menu (i.e. About, Services, Hide, Show All, Quit) and selecting "Quit ", it is causing my Java application to hang.    It used to work but now I get the spinning wheel and the only way to close the application is to force quit it.  Tried it on another system and it does the same thing. In debugging on the Java application side, this Quit operation does not trigger the main windowClosing() event.  So, it is hanging the application somewhere upstream.  Any ideas on where to check?   My OSX is 11.6.2 Big Sur and Java version 16.0.1 2021-04-20.
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
525
Feb ’22
Calling an AppleScript application from a Java Program
Code Example I am trying to call an AppleScript application from a Java program. I found this code example: package com.devdaily.mac.applescript; import java.io.IOException; public class MultilineAppleScriptTest { public static void main(String[] args) { new MultilineAppleScriptTest(); } public MultilineAppleScriptTest() { Runtime runtime = Runtime.getRuntime(); // an applescript command that is multiple lines long. // just create a java string, and remember the newline characters. String applescriptCommand = "tell app \"iTunes\"\n" + "activate\n" + "set sound volume to 40\n" + "set EQ enabled to true\n" + "play\n" + "end tell"; String[] args = { "osascript", "-e", applescriptCommand }; try { Process process = runtime.exec(args); } catch (IOException e) { e.printStackTrace(); } } } Problem When searching for the package "com.devdaily.mac.applescript" it references in Eclipse for installing new software, it does not find the package or even just searching for "applescript" in general. So, this must be a one off custom package the author created. Any ideas on locating this package OR do you know of any other examples I can try that performs a similar purpose? Thank you!
2
0
1.4k
Sep ’21
Apple Application Menu: "Quit <my application name>" event hanging
When going to the Apple Application menu (i.e. About, Services, Hide, Show All, Quit) and selecting "Quit ", it is causing my Java application to hang. It used to work but now I get the spinning wheel and the only way to close the application is to force quit it. Tried it on another system and it does the same thing. In debugging on the Java application side, this Quit operation does not trigger the main windowClosing() event. So, it is hanging the application somewhere upstream. Any ideas on where to check? My OSX is 11.6.2 Big Sur and Java version 16.0.1 2021-04-20.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
3
Boosts
0
Views
469
Activity
Feb ’22
Apple Application Menu: "Quit <my application name>" event hanging
When going to the Apple Application menu (i.e. About, Services, Hide, Show All, Quit) and selecting "Quit ", it is causing my Java application to hang.    It used to work but now I get the spinning wheel and the only way to close the application is to force quit it.  Tried it on another system and it does the same thing. In debugging on the Java application side, this Quit operation does not trigger the main windowClosing() event.  So, it is hanging the application somewhere upstream.  Any ideas on where to check?   My OSX is 11.6.2 Big Sur and Java version 16.0.1 2021-04-20.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
1
Boosts
0
Views
525
Activity
Feb ’22
AppleScript Plist array of items creation example?
Looking for a simple AppleScript example of creating an array of string items (i.e. Item 0, Item 1, ... Item n) in a new plist file. Only have found an example of how to read an array item in an existing plist file and not the initial creation of the array of strings itself in a new property list. Appreciate the assistance.
Replies
1
Boosts
0
Views
844
Activity
Oct ’21
Calling an AppleScript application from a Java Program
Code Example I am trying to call an AppleScript application from a Java program. I found this code example: package com.devdaily.mac.applescript; import java.io.IOException; public class MultilineAppleScriptTest { public static void main(String[] args) { new MultilineAppleScriptTest(); } public MultilineAppleScriptTest() { Runtime runtime = Runtime.getRuntime(); // an applescript command that is multiple lines long. // just create a java string, and remember the newline characters. String applescriptCommand = "tell app \"iTunes\"\n" + "activate\n" + "set sound volume to 40\n" + "set EQ enabled to true\n" + "play\n" + "end tell"; String[] args = { "osascript", "-e", applescriptCommand }; try { Process process = runtime.exec(args); } catch (IOException e) { e.printStackTrace(); } } } Problem When searching for the package "com.devdaily.mac.applescript" it references in Eclipse for installing new software, it does not find the package or even just searching for "applescript" in general. So, this must be a one off custom package the author created. Any ideas on locating this package OR do you know of any other examples I can try that performs a similar purpose? Thank you!
Replies
2
Boosts
0
Views
1.4k
Activity
Sep ’21