Posts

Post not yet marked as solved
0 Replies
507 Views
I can't seem to execute Voiceover command with JXA. The following AppleScript works. tell application "VoiceOver" tell commander to perform command "item chooser" end tell However, the following script in JXA throws a mystery error. vo = Application("VoiceOver") vo.commander.performCommand("item chooser") Error 6: An error occurred. I'd really appreciate any help with this! Thanks so much!
Posted
by chibop.
Last updated
.
Post not yet marked as solved
0 Replies
253 Views
How can I get Playlists associate with a Genre? The following link doesn't work. https://api.music.apple.com/v1/catalog/us/genres/14/playlists
Posted
by chibop.
Last updated
.
Post not yet marked as solved
0 Replies
536 Views
Hi,I have a very simple testing code below for a custom NSView, but VoiceOver (VO) acknowledges titleChanged but ignores valueChanged notification.I have two shortcuts for executing changeTitle and changeValue.After making sure VO cursor is on the element, if I press the shortcut for changeTitle, VO announces the new title.However, if I press the shortcut for changeValue, VO says nothing.If I refocus the VO cursor manually, it reads the new value.I can force VO to say by sending either layoutChanged or announcementRequested notification, but I'm wondering why VO ignores valueChanged notification?The testing code is below, and thanks so much for your help!class CustomView:NSView { var val = "Value" var title = "Title" override func isAccessibilityElement() -> Bool { return true } override func accessibilityRole() -> NSAccessibility.Role? { return .button } override func accessibilityTitle() -> String? { return title } func changeTitle() { title = "title \(Int.random(in:1...10))" NSAccessibility.post(element: self, notification: .titleChanged) } override func accessibilityValue() -> Any? { return val } func changeValue() { val = "Value \(Int.random(in:1...10))" NSAccessibility.post(element: self, notification: .valueChanged) } }
Posted
by chibop.
Last updated
.