I've been at this for some time now, and can't seem to get it work. I'm very new with applescript...
All I want is to create a list in TextEdit with the numbers from 1 to for example 10, each on its own line.
This is what I've done so far, but it doesn't seem like the repeat loop wants to output each iteration?
Here's my code:
Can anybody see what's wrong? Obviously this must be the most simple thing to do?
J
All I want is to create a list in TextEdit with the numbers from 1 to for example 10, each on its own line.
This is what I've done so far, but it doesn't seem like the repeat loop wants to output each iteration?
Here's my code:
Code:
tell application "TextEdit"
open (choose file)
tell front document
tell its text
repeat with counter from 1 to 10
set its text to text & return & counter
end repeat
end tell
save
close
end tell
end tell
Can anybody see what's wrong? Obviously this must be the most simple thing to do?
J