openurl
URL
The openurl statement opens a URL (usually a web page or to create an e-mail message).
Parameters
This statement has one parameter:
url – is the the URL to be opened. If you are opening a web page, it is the absolute URL of the web page, starting with http://
. If you are creating an e-mail message, it must begin with mailto:
followed by the e-mail address (optionally followed by ? and the e-mail subject).
Description
The openurl statement opens a web page or creates an e-mail messages. (It can also be used to open a document, but we recommend using openanything instead).
To open a web page use the "http://"
prefix. This example opens the HTML document Roadshow.html on the web server www.genericsite.com . The HTML document will be opened using the default web browser.
openurl "http://www.genericsite.com/Roadshow.html"
To create a new e-mail message use the "mailto:"
prefix followed by the e-mail address. This will open the default e-mail client and create a new e-mail message addressed to the specified person. This example creates a new message addressed to webmaster@myisp.com.
openurl "mailto:webmaster@myisp.com"
To specify a subject for the new e-mail, add a suffix beginning with ?. (Note: Not all e-mail clients support this.)
This example creates a new message addressed to lynn@mt.com with a subject of Your next assignment.
openurl "mailto:lynn@mt.com?Your next assignment"
To open a file on your local disk, use the prefix "file:///"
, like this:
openurl "file://My Disk:My Documents:Manual.pdf"
However, we recommend using openanything instead.
Error Messages
Could not open URL – This error occurs if the URL is not valid.
See Also
- applescriptconstant( -- converts an expression into an AppleScript literal.
- applescriptstring( -- converts text into an AppleScript string literal.
- arraytopythonlist( -- converts a Panorama array into a Python list.
- hideotherapplications -- hides all other applications, leaving only Panorama visible.
- javascriptconstant( -- converts an expression into a JavaScript literal.
- javascriptstring( -- converts a text string into a JavaScript string
- jsonscriptstring( -- converts text into a JSON string literal
- loadcustomfunctions -- reloads all ProVUE defined custom functions.
- openanything -- opens a document or application.
- openurlinbackground -- opens a URL (usually a web page or to create an e-mail message) without bringing forward the app that handles the URL (in other words, Panorama remains the frontmost application).
- openwith -- opens a document with a specific application.
- openwithterminal -- opens an application in a new Terminal.app window (useful for debugging).
- perlconstant( -- encodes text for use as a constant in a Perl program.
- perlscriptstring( -- converts text into a Perl string literal.
- phpconstant( -- encodes text for use as a contant in a php program.
- posixpath( -- converts a path and filename into a POSIX path that can be used as a parameter to a shell command.
- pythonconstant( -- encodes text for use as a constant in a python program.
- registercustomfunction -- defines a new custom function.
- revealinfinder -- reveals a file or folder in the Finder.
- revealmultipleinfinder -- reveals one or more files or folders in the Finder.
- rubyconstant( -- encodes a value for use as a constant in a Ruby program.
- runningappinfo( -- returns information about applications that are currently running on this computer.
- Scripting Panorama X with AppleScript -- embedding Panorama code into AppleScript (allowing Panorama to be controlled from other programs).
- setappleeventvalue -- may be used in a procedure that responds to an AppleEvent (this includes AppleScript programs), the statement specifies the value to be returned by the event.
- shellscriptwithterminal -- runs a shell script in a new Terminal.app window (useful for debugging).
- unixshellpath( -- converts a path and filename into a POSIX path that can be embedded within the shellscript statement.
- unixshellstring( -- encodes text for use as a parameter to a unix shell command.
- urlfilename( -- extracts the filename from a complete url.
- urlpath( -- extracts the path from a URL.
History
10.0 | Updated | Carried over from Panorama 6, but the name has been changed from shellopendocument (which, for compatibility with older databases, will still work). |