Can you call the "Preview in BBEdit" function from Applescript?
(Can't find anything appropriate in the Dictionary and I have not
found any answers to this in this forum or elsewhere on the net)

I appreciate I can use System Events to click menu items, but want to
call it direct if possible to avoid another problem:

BBEdit only seems to execute the system events part of the applescript
(i.e. my menu click) once the rest of the calling bbedit applescript
has completed. This means that the overall script does not work.

Is this a known issue with Applescript?

What I am doing is (scripting):
(- writing wiki content in creole)
- saving the creole doc as a temp file
- running a unix filter to convert creole to html
- running "preview in BBEDIT" to view the output
- opening the original file up again
(- continue editing)

I have also tried previewing in the browser as their is an applescript
command for this.

However this is also problematic as I cannot seem to set the 'preview
mode' of the HTML Prefs record to use temporary file (to avoid having
to save the temp file) as it seems that you cannot use:

tell application "BBEdit"
  set htmlPrefs to get html preferences
  set preview mode of htmlPrefs to use temporary file
  set html preferences to htmlPrefs
end tell

you get an error:  "Some data was the wrong type" (expected type item)
which is very odd as you get this error whether or not you actually do
anything (e.g. set preview mode) to the variable (htmlPrefs).  BBEdit
seems to have a problem/bug getting and setting html prefs.

If anyone can help me with any of the above, I would be very
grateful.

Equally if someone can think of a better way to do what I am trying to
do, which avoids these problems, an explanation would be most
welcome ;-)

Thanks

-- 
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.

Reply via email to