Hi Dónal,

I'll just point out that once you have made an AppleScript, you can place it in 
your account's Library/Scripts folder, and then access it from the Scripts menu 
on your status menu bar (with either Control-F8 or VO-M twice), if you have 
checked "Show Script menu in menu bar" under the General tab of the preferences 
menu for the AppleScript Editor.  You can also choose to save the AppleScript 
as an application.

In either case,  the net result is that you can use the AppleScript in a 
GUI-based environment.  In fact, you can also put an AppleScript wrapper around 
shell scripts so that you can access them from the GUI environment without 
having to open Terminal.  As an example of this, I recall that someone (on 
another list) was looking for a command-line tool to perform batch conversions 
of PDF to text, and Tim Kilburn pointed him to a shell tool named pdftotext at:
http://www.bluem.net/en/mac/others/
(Note, this tool is not for converting PDF graphics files that you've scanned 
for OCR, but rather, the sort of PDF documents that you can read in Preview).  
Instead of using this from Terminal, I was able to make this into an 
AppleScript using "do shell script".  The AppleScript worked with the 
executable script that was installed in /usr/local/bin/pdftotext and looked 
like this:

---Cut Here---
(*
Use pdftotext to create a text version of the selected PDF file    
       Created 17 May 2011
*)
on run
        tell application "Finder"
                set chosenFile to the selection as alias
        end tell
        do shell script "/usr/local/bin/pdftotext " & quoted form of POSIX path 
of chosenFile 
end run

After compiling (with Command+K), I could select files in Finder, and run the 
AppleScript (with Command+R) to convert files entirely from the GUI.  (Of 
course, in general you must know enough to make sure that such scripts that you 
download are made executable, and are in your default path, but these are 
common concepts for unix and linux systems that have simple commands to 
implement.) 

I'm pleased that Tunnelblick now supports AppleScript.  Incidentally, does 
anyone know how the developer of the Radium Mac OS X app managed to make that 
app's status menu bar icon accessible?  The results of opening it from either 
by double tapping the icon in the Dock (with Trackpad Commander on) or by using 
the keyboard shortcut to open the app (that you can activate by bringing up the 
preferences menu when the app is running, but with no windows open, if you 
check the box for enabling a shortcut to open the app) appears to be just the 
same as when a sighted person clicks on the status menu bar icon. I fooled 
around with the trial version of Radium from Macupdate, and checked on this 
with others.

HTH. Cheers,

Esther


On Sep 19, 2011, at 11:50, Dónal Fitzpatrick wrote:

> Hi all,
> 
> As some on list may remember I had reason to post a long time ago about my 
> search for an accessible open vpn client.
> 
> Now while (to the best of my knowledge) accessibility for the GUI-based 
> clients hasn't noticeably improved, one application, tunnelblick, has made a 
> jump forward and is now perfectly usable *if* you're prepared to use 
> applescript.  While it's true that the connections can't be started easily 
> from the gui you can start them now through applescript.  I've been playing 
> with this a bit over the past day, and I now have almost complete control 
> over the connections.  I paste a sample script below:
> 
> tell application "Tunnelblick"
>       get configurations
>       connect "openvpn"
> end tell
> 
> Note I've just called the config "openvpn" for convenience here.
> 
> There are many other entries in the tunnelblick dictionary and its home page 
> is at:
> 
> http://code.google.com/p/tunnelblick/
> 
> This may be of absolutely no use to anyone, but it's no harm to have it in 
> the list archives anyway.
> 
> Dónal
> Dónal Fitzpatrick
> [email protected]
> 
> 

<--- Mac Access At Mac Access Dot Net --->

To reply to this post, please address your message to [email protected]

You can find an archive of all messages posted    to the Mac-Access forum at 
either the list's own dedicated web archive:
<http://mail.tft-bbs.co.uk/pipermail/mac-access/index.html>
or at the public Mail Archive:
<http://www.mail-archive.com/[email protected]/>.
Subscribe to the list's RSS feed from:
<http://www.mail-archive.com/[email protected]/maillist.xml>

The Mac-Access mailing list is guaranteed malware, spyware, Trojan, virus and 
worm-free!

Please remember to update your membership options periodically by visiting the 
list website at:
<http://mail.tft-bbs.co.uk/mailman/listinfo/mac-access/options/>

Reply via email to