Hi, I’m new to Applescripting and I mostly work on a PC. But right now I’m working on a cross-platform CD-ROM. I need a very basic Applescript which will open a webpage in the viewer’s web browser. I’ve tried
tell application "Internet Explorer"
Activate
OpenURL "http://www.mywebpage.com/"
end tell
Only I don’t want the script to specify which application (I want it to just choose the default webpage handler for the person’s Mac).
tell application "Finder"
open location "http://www.webpage.com"
end tell
but got an error message on the CD with that one. I’m calling the Applescripts from Macromedia Flash. I have no trouble with Applescripts that open PDF files, just the webpage. I get the “Some data was the wrong type” error message. But perhaps I’ve screwed up somewhere other than the script itself…
I can alter my PDF-opening script to open an HTML file that redirects to the webpage I want, but that seems a redundant workaround.
Hi, I’ve tried using that line by itself. It works just fine! Except I have one problem: I only have a Mac OS 8.5 to write the scripts on. I tried using the script that I had written on OS 8. 5 on an OS X computer. It works, except that it causes the OS X to restart in classic mode (OS 9). Is there any way around that?
I guess maybe now I’m in the wrong forum for this question. I am trying to script in a pre-OS X version of Mac. I’m hoping that a script as basic as opening a webpage will work in OS X also. I know some of the people viewing my stuff will be using OS X.
But, as I said, it opens in classic OS 9. And so I don’t know what would happen if the user only had OS X on their computer. Is anyone out there running OS X only? If so, can you tell me if this script works on it (attachment in binhex)?
It works fine on my OS X-only machine when run from Script Editor but when I launch the script it asks for classic. I don’t have classic so I don’t know how to overcome the issue.
Funny thing is I have the other script that I use for opening PDF’s. It works fine in OS X (though I created it in OS 8.6). But if I replace a PDF with an HTML document, it switches to OS Classic. Strange.
Thanks for your testing help! Hey, any idea if a script created in OS X is backwards compatible? Like if you saved “open location…” as an application on OS X, would it work on OS 8.6? Maybe I can borrow an OS X at some point (so long as it’s backwards compatible).
Hi. Can you tell me how you saved that? Application, script, etc.? I managed to borrow an OS X for a while so want to try making some (that will hopefully be bacwards compatible).