You need only specify a suitable URL in your script, e.g. an 'ftp:' or
'sftp:' URL for a file you want to edit, and that will tell BBEdit how to
handle the resulting item.
For example, if you prepend the following to that action
====
tell application "BBEdit"
-- (the following is only an example; please replace this
-- with a real URL before using :-)
--
set theURL to "sftp://user:@host.example.com//Users/me/Sites/hello.html"
set theTitle to "hello.html"
set newItem [...etc...]
end tell
====
and run your script, BBEdit should create an item named "hello.html" within
the specified collection of the active project, and you can then just click
that item to open the specified remote file in BBEdit.
Regards,
Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com/>
At 13:08 -0700 10/10/2012, Rebecca wrote:
>It is possible to create a URL project item (the sort of project item that
>you get when you drag a the icon beside a URL to the project window) using
>the following Applescript:
>
>set newItem to make new project item in project collection "[collection
>name]" of project document 1 with properties {URL:theURL as string,
>name:theTitle}
>
>This will create a project item that will open the URL in your default
>browser when you click it. However:
>
>URL of newItem
>
>Is «data url 68747470733A2F2F7777772E697374652E6F72672F». I can't figure
>out how to turn this back into a usable URL, or how to use the existing
>project item to open a web page. Is there a way?
>
>Thank you,
>Rebecca
--
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>