-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not work with this automator workflow #1
Comments
Do you see the sidecar icon in the System Preferences window? |
@rauls4 Yes! Actually, after I ran this workflow, the sidecar panel was opened, then I got that error message. My OS is Catalina 10.15.5 |
Hmm. I am not sure what the deal is (I assume you are running the OS in English). AppleScript is basically complaining that there is not "Sidecar" window open, if you see a window very much like this one then it should work. If AppleScript still complains that it cannot see it I am not sure there is much I can do about it. |
@websitefingerprinting can you indicate that which language are you using? @rauls4 I also encounter this problem and my OS language is Chinese of Taiwan (zh-tw), therefore my Sidecar window has got a localized title in Chinese ("並行") in my case. Is there a workaround? |
I have found a way to list all UI item in my "Sidecar" window Should I change all UI strings in this workflow to localized terms? [Update] Yes! After localizing all the UI strings, this workflow works like a charm. And also I have solved #3 by making this workflow an application, not only a Service, so that no any other app needs permission granted. I love this workflow of yours @rauls4 and bravo and kudos to Apple automation! Here is my script for zh-tw users, for macOS 11.4 or versions with the same Sidecar UI: tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.sidecar"
get the name of every anchor of pane id "com.apple.preference.sidecar"
delay 1
tell application "System Events"
set target_button to a reference to (first button whose name is "中斷連線") of (window "並行" of application process "System Preferences")
if target_button exists then
click target_button
else
click menu button "選擇裝置" of window "並行" of application process "System Preferences"
count menu items of menu of menu button "選擇裝置" of window "並行" of application process "System Preferences"
select item 1 of menu button "選擇裝置" of window "並行" of application process "System Preferences"
key code 125
key code 76
end if
end tell
quit
end tell |
Hi! I tried to use this workflow but it did not work. The log was:
can't obtain “window "Sidecar" of application process "System Preferences"
I am not familiar with Applescript and I have no idea how to fix it. Do you have any idea where the problem is?
Thank you so much!
The text was updated successfully, but these errors were encountered: