Created
January 2, 2024 18:02
-
-
Save edenwaith/66181c1343f714cf87ee14026c42dc78 to your computer and use it in GitHub Desktop.
Applescript to copy text from the Mac's clipboard to older iOS Simulators
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Any iOS Simulator which isn't the most current version has issues with working with the | |
-- system's clipboard, which makes things difficult if one wants to copy a lengthy username | |
-- into a field. This script is a workaround which will get the text from the system's | |
-- clipboard and then paste that text into a field in the active iOS Simulator. | |
-- Reference: https://stackoverflow.com/questions/15188852/copy-paste-text-into-ios-simulator | |
tell application "System Events" | |
set theText to get the clipboard as text | |
delay 1 | |
repeat with aCharacter in characters of theText | |
keystroke aCharacter | |
delay 0.05 | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment