Re: Stuck trying to use creatorid to control IE
Re: Stuck trying to use creatorid to control IE
- Subject: Re: Stuck trying to use creatorid to control IE
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 10 Dec 2002 20:06:43 -0800
The Smile Help also explains that application-specific keywords do not
compile outside their tell block. In OS 8.5, you have to use the raw code
equivalent. I believe that there's a very easy way to get that now in Smile
- I haven't used Smile for a while. It used to be (and may still be in the
Classic Smile you're using) that you did a "Copy Transfer" from a Smile
window targeted to your app in question (IE) and pasted into an untargeted
window. The Smile Help will tell you how to do it.
In any case, the raw code for IE's GetSource is <<event MSIESORC>> , You
don't use actual << and >> characters but instead the chevron characters
made by option-\ and shift-option-\ on US keyboards. (This mailing list
mangles these symbols so I can't type them directly. Isn't that stupid?)
In OS 9 and later, you don't need to know raw codes - you just put your tell
block in a
using terms from application "Internet Explorer"
tell application appName
--etc.
end tell
end using terms from
-
But pre OS 9 you do. [OT, sort of: For goodness' sake, at least upgrade to
8.6, which was one of the best OS's and is a free update form 8.5. 8.5 is
one of the most unstable, wonky OS versions ever.]
-
Paul Berkowitz
>
From: email@hidden
>
Date: Tue, 10 Dec 2002 22:45:24 -0500
>
To: email@hidden
>
Subject: Stuck trying to use creatorid to control IE
>
>
I'm trying to write an Applescript that will let me control whatever version
>
of IE the user happens to have on their Mac, when running either Mac OS 8.1,
>
8.5, or 8.6. Based on the recommendation of folks on this list, I looked at
>
the SMILE docs for portability, and learned about the "creatortype" method of
>
accessing applications (like using MSIE to access Internet Explorer.
>
>
The problem I'm having is the compiling step. When in Mac OS 8.5 (where I'm
>
writing the script), it complains that it doesn't know anything about the
>
"GetSource{}" call. Yet it did compile when I referenced the name of the app
>
directly (tell application "Internet Explorer") I seem to be stuck - - - -
>
from what I'm reading, I need to use the "using terms from" command so that it
>
will compile, but OS 8 doesn't support that - - and if I don't use it, the
>
script won't compile.
>
>
My goal is to get IE to pass back the HTML-source of whatever web-page it's
>
on, running on all versions of OS 8. Is this possible? Here's what I've got
>
so far:
>
>
>
set theCreator to "MSIE"
>
tell application "Finder"
>
set theAppName to name of application file id theCreator
>
end tell
>
>
try
>
tell application theAppName
>
copy (GetSource {}) to html_source
>
return html_source
>
end tell
>
on error error_message number errNum
>
display dialog "Applescript Error: " & errNum & " " & error_message
>
end try
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.