Send Clipboard content when key not in object?
Posted: 16 May 2022, 12:46
Hey,
I have now with help of Mikeyww got this in action. But there are several cliboard contents which do not yet exist as a key or value in object. And I do want to create them manually in the list later.
How to turn to something like this that works:
I have now with help of Mikeyww got this in action. But there are several cliboard contents which do not yet exist as a key or value in object. And I do want to create them manually in the list later.
Code: Select all
F12::
Clipboard := "A kiwi" ;Or any other fruit that is not yet in the list, so it could be anything, no way to know all beforehand.
email := {"A banana": "bannas@fruits.mars", "An apple": "apples@fruits.mars"}
MsgBox % email[Clipboard]
;SendInput % email[Clipboard]
return
Code: Select all
F12::
email := {"A banana": "bannas@fruits.mars", "An apple": "apples@fruits.mars"}
If (email ~= Clipboard)
MsgBox, % email[Clipboard]
else
MsgBox, % Clipboard
return