Essentially what I'm trying to do is rather simple. Or at least, it should be...
the intent of this little gem is to open a jpeg in textedit, select a random block of 100 lines, cut it, and paste it to another random location. instead... nothing seems to happen at all. sure, textedit opens, but that's about it.
can anyone help?
Code:
set rand1 to random number from 20000 to 40000
set rand4 to random number from 1000 to 10000
set rand5 to random number from 30000 to 50000
set theFile to choose file with prompt "Select an image (in jpeg format dood!)"
tell application "TextEdit" to open theFile
tell application "TextEdit" to activate
tell application "System Events" to tell process "TextEdit"
repeat rand1 times
key code 125
end repeat
shift key down
repeat 100 times
key code 125
end repeat
shift key up
key code 7 using command down
repeat rand4 times
key code 125
end repeat
key code 9 using command down
end tell
end
the intent of this little gem is to open a jpeg in textedit, select a random block of 100 lines, cut it, and paste it to another random location. instead... nothing seems to happen at all. sure, textedit opens, but that's about it.
can anyone help?