Re: IE check if page is fully loaded
Re: IE check if page is fully loaded
- Subject: Re: IE check if page is fully loaded
- From: Ingo Bitsch <email@hidden>
- Date: Wed, 27 Jun 2001 19:33:38 -0400
>
set frontmost_window to item 1 of {ListWindows}
>
set wait_flag to ""
>
repeat until wait_flag = "complete"
>
set wait_flag to do script "document.readyState" window
>
frontmost_window
>
end repeat
Thanks, Matt,
this is a great routine! I pasted on the bottom of this message
what my script looks like now (it's actually a script for
reporting spam to spamcop.net). Now, the problem is that one part
of the "do script"- Javascript is actually a variable (msgText)
that contains a whole email message. It seems to include some
special characters that confuse JavaScript (it produces an
error). I escaped the ' but that didn't help. Is there a function
in Javascript that escapes all special charactes in its argument,
something like "ignore(msgText)" ?
Thanks,
Ingo
--------------------------------------
tell application "Mailsmith 1.1"
set msgText to header text of selection & return & content of
selection as text
move selection to trash
end tell
tell application "Internet Explorer"
Activate
OpenURL "
http://members.spamcop.net"
set frontmost_window to item 1 of {ListWindows}
set wait_flag to ""
repeat until wait_flag = "complete"
set wait_flag to do script "document.readyState" window
frontmost_window
end repeat
set msgText to replace "'" by "\\'" in msgText
do script "document.submitspam.spam.value='" & msgText & "';"
do script "document.submitspam.submit();"
end tell