如何使用 AppleScript 为变量赋值?

How to assign get value to a variable using AppleScript?

如何将 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

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