I am a total noob with applescripts,
I learned about how keystroke can type "stuff" if its put into quotes.
However I want to type a complex sentence involving the value of variable x.
like this: Nick is x years old
And I want this to be typed in something like TextEdit not the bottom dialog box in the script window.
I trid this but failed, and could not get further
tell application "System Events"
tell process "TextEdit"
set frontmost to true
end tell
set x to 20
keystroke "Nick is "
keystroke x
keystroke " years old"
end tell
How can I make this work?
any help would be really helpfull
I learned about how keystroke can type "stuff" if its put into quotes.
However I want to type a complex sentence involving the value of variable x.
like this: Nick is x years old
And I want this to be typed in something like TextEdit not the bottom dialog box in the script window.
I trid this but failed, and could not get further
tell application "System Events"
tell process "TextEdit"
set frontmost to true
end tell
set x to 20
keystroke "Nick is "
keystroke x
keystroke " years old"
end tell
How can I make this work?
any help would be really helpfull