I realize that Firefox isn’t scriptable, but maybe there is a way around this limitation in my instance?
In my instance, Firefox will be the active application and the active page will contain a two field entry box, which sometimes has pre-populated text - but the cursor is always active in the top field.
Is there a way for the system to just type text as if it doesn’t care what application it is targeting?
The system would then need to the following:
perform a key code that mimics “cmd” + a. For example: key code “0” using {command down}
insert or type the text “g r a p h i c s” in the first field.
perform a “tab” key code to advance to the next field.
3, insert or type the text “c o d e”.
process “Firefox” doesn’t error here because it’s being ignored. Although System Events’s keystroke and key code commands are most commonly used in conjunction with GUI Scripting, they’re actually independent of it. They work even when GUI Scripting’s disabled. They’re not executed by the processes receiving the keystrokes but by System Events itself, which applies the keystrokes to whatever process is frontmost at the time, as it would if you were typing at the keyboard.