Safari: When do changes to a <textarea> show up in AppleScript "get the text..."
Safari: When do changes to a <textarea> show up in AppleScript "get the text..."
- Subject: Safari: When do changes to a <textarea> show up in AppleScript "get the text..."
- From: email@hidden
- Date: Tue, 20 Oct 2009 09:50:41 -0700 (PDT)
I have the following script that I use to read the text of a Safari document and write it to a file:
tell application "Safari"
set txt to get the text of document 1
end tell
set f to a reference to file ((path to desktop as string) & "justTesting1")
open for access f with write permission
write txt to f
close access f
If I have a web page displayed in Safari that has a <textarea> in it, then the contents of the <textarea> appear in the text written to the file.
However, if I merely change the contents of the <textarea> and then delete the file contents and rerun the script I still get the value of the <textarea> before I changed it.
If I click a button that causes part of the page to be reloaded and then delete the file contents and rerun the script I get the new value of the <textarea>
I guess my question is when do changes I type into a <textarea> get bound to the text of document 1?
Thanks,
Jerry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden