i want a script that will do keystrokes i dont no how to go about this. what i nead is to tell textedit etc. to do the keystroke command-n so i can open multiple windowsthis would be very handy to me :P.
a script that would open multiples of the same thing would also work if you try to open more than one of the same thing it uses the same window :(.
If you have or install GUI Scripting, this should work:
tell application "TextEdit" to activate
tell application "System Events"
repeat 5 times
keystroke "n" with command down
end repeat
end tell
The same can be accomplished with Extra Suites:
tell application "TextEdit" to activate
tell application "Extra Suites"
repeat 5 times
type key "n" with command
end repeat
end tell
– Rob
Um, why use keystrokes? TextEdit is scriptable so try:
or, if I understand your query:
Jon
[This script was automatically tagged for color coded syntax by Script to Markup Code]
That’s what I thought too but I tried to make new windows and it failed. I didn’t even try to make a new document. :?
– Rob (the one who missed the simple solution)
Thank you so much this is awsome. The first one does exactly what i neaded.