0
我想如果選擇另一個單選按鈕,在系統偏好設置點擊一個單選按鈕,如下所示:AppleScript的UI腳本 - 有條件
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
click menu item "Mouse" of menu "View" of menu bar 1
if radio button "Right" is selected <-- pseudo-code
tell window "Mouse"
tell radio group 1
click radio button "Left"
end tell
end tell
end if
if radio button "Left" is selected <-- pseudo-code
tell window "Mouse"
tell radio group 1
click radio button "Right"
end tell
end tell
end if
end tell
end tell
人知道如何做到這一點?
謝謝你的幫助! 只需插入一個else語句即可使其工作。 你是對的,大多數用戶會擔心,如果他們的主鍵被設置爲「正確」 - 但是由於肩傷,我在使用我的軌跡球時經常換手。 – timkl 2010-08-20 10:59:50