Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance Force
- ;Text Menu with words Function
- TextMenu(TextOptions)
- {
- ;StringSplit, MenuItems, TextOptions , `,
- StringSplit, MenuItems, TextOptions , `¦
- Loop %MenuItems0%
- {
- Item := MenuItems%A_Index%
- ;Menu, TxtMenu, add, %Item%, TxtMenuAction
- Menu, TxtMenu, add, %Item%, TxtMenuAction
- }
- Menu, TxtMenu, Show
- Menu, TxtMenu, DeleteAll
- }
- TxtMenuAction:
- SendInput %A_ThisMenuItem%{Text}%A_EndChar%
- Return
- ;Text menu with separate actions of menu items
- :*:ryg::
- TextMenu("It's red.¦It's yellow.¦It's green.")
- If A_thismenuitem = It's red.
- {
- SendInput, ^+{Left 2}
- SendInput, {Raw}
- (
- Stop.
- )
- }
- Else If A_thismenuitem = It's yellow.
- {
- SendInput, ^+{Left 2}
- SendInput, {Raw}
- (
- Get ready.
- )
- }
- If A_thismenuitem = It's green.
- {
- SendInput, ^+{Left 2}
- SendInput, {Raw}
- (
- Safe to drive.
- )
- }
- Return
Advertisement
Add Comment
Please, Sign In to add comment