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
# chessboard.py | |
# juanfc 2023-03-14 | |
# | |
from turtle import * | |
ancho = 50 | |
speed(0) | |
color("black", "black") |
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
on numberAsKeycode(theString) | |
tell application "System Events" | |
repeat with currentChar in (every character of theString) | |
set cID to id of currentChar | |
if ((cID ≥ 48) and (cID ≤ 57)) then | |
key code {item (cID - 47) of {29, 18, 19, 20, 21, 23, 22, 26, 28, 25}} | |
else | |
keystroke currentChar | |
end if | |
delay 0.03 |