Post

Replies

Boosts

Views

Activity

[Applescript] set miniatured property failed
Hi, Recently we tested how to minimize app using Applescript as below picture and find some interesting phenomenon. After executing the script, if “miniaturized” marked in green (recognized as parameter), it failed to set minimize property. If “miniaturized” marked in purple, it is ok to set minimize property. Because the syntax is exactly the same, could you help to guide us what is wrong with the script? Sincerely, Thanks, YM
3
0
1.1k
May ’23
"URLsForApplicationsToOpenContentType" alternative in macOS
Recently we surveyed macOS file association by extension to retrieve what app to “open with”. Ex: image.png -> “Preview” to open “URLsForApplicationsToOpenContentType”(macOS 12.0+) is a good API which returns NSArray for “open with” app list. https://developer.apple.com/documentation/appkit/nsworkspace/3752999-urlsforapplicationstoopencontent May I ask the alternative for “URLsForApplicationsToOpenContentType” below macOS 12.x ?  “LSCopyDefaultApplicationURLForContentType” (macOS 10.10–12.00) is “Deprecated”. https://developer.apple.com/documentation/coreservices/launch_services?language=objc
0
0
365
Nov ’22
NSAppleScript memory leak
Platform: macOS 12.3.1 Xcode: 13.3 I had Xcode ARC turned ON. AppleScript should be declared like below. NSAppleScript *script = [[NSAppleScript alloc] initWithSource:strScript]; When call AppleScript, open "Monitor.app" app will observe some memory leak. I try to wrap AppleScript by autoReleasePool. Memery leak still exists @autoreleasepool { NSAppleScript *script = [[NSAppleScript alloc] initWithSource:strScript]; //script to do something } Is there other suggestion to do gabage collection to release memory?
15
0
2.8k
Jul ’22
macOS14.x + change icc profile.
When changing icc profile in macOS14.x, app may get 2 "NSApplicationDidChangeScreenParametersNotification". And some platform is normal like M2 Pro Mac mini v14.4.1 will receive once. Any idea about this symptom?
Replies
0
Boosts
0
Views
706
Activity
Apr ’24
[Applescript] set miniatured property failed
Hi, Recently we tested how to minimize app using Applescript as below picture and find some interesting phenomenon. After executing the script, if “miniaturized” marked in green (recognized as parameter), it failed to set minimize property. If “miniaturized” marked in purple, it is ok to set minimize property. Because the syntax is exactly the same, could you help to guide us what is wrong with the script? Sincerely, Thanks, YM
Replies
3
Boosts
0
Views
1.1k
Activity
May ’23
"URLsForApplicationsToOpenContentType" alternative in macOS
Recently we surveyed macOS file association by extension to retrieve what app to “open with”. Ex: image.png -> “Preview” to open “URLsForApplicationsToOpenContentType”(macOS 12.0+) is a good API which returns NSArray for “open with” app list. https://developer.apple.com/documentation/appkit/nsworkspace/3752999-urlsforapplicationstoopencontent May I ask the alternative for “URLsForApplicationsToOpenContentType” below macOS 12.x ?  “LSCopyDefaultApplicationURLForContentType” (macOS 10.10–12.00) is “Deprecated”. https://developer.apple.com/documentation/coreservices/launch_services?language=objc
Replies
0
Boosts
0
Views
365
Activity
Nov ’22
NSAppleScript memory leak
Platform: macOS 12.3.1 Xcode: 13.3 I had Xcode ARC turned ON. AppleScript should be declared like below. NSAppleScript *script = [[NSAppleScript alloc] initWithSource:strScript]; When call AppleScript, open "Monitor.app" app will observe some memory leak. I try to wrap AppleScript by autoReleasePool. Memery leak still exists @autoreleasepool { NSAppleScript *script = [[NSAppleScript alloc] initWithSource:strScript]; //script to do something } Is there other suggestion to do gabage collection to release memory?
Replies
15
Boosts
0
Views
2.8k
Activity
Jul ’22