如何将first menu bar item of menu bar 1 whose description is "text input"
的值赋值给另一个变量?
tell application "System Events"
tell process "SystemUIServer"
get value of first menu bar item of menu bar 1 whose description is "text input"
end tell
end tell
答案 0 :(得分:1)
将get value of ...
作为输出,并以通常的方式将值分配给变量。不要忘记在get value of ...
tell application "System Events"
tell process "SystemUIServer"
set inputValue to (get value of first menu bar item of menu bar 1 whose description is "text input")
return inputValue
end tell
end tell