Re: Word 2004 VBA -> Applescript



On 9/1/06 8:37 AM, in article C11E203C.198C6%daix@xxxxxxxxxxxxxxxx,
"David-Artur Daix" <daix@xxxxxxxxxxxxxxxx> wrote:

The truth is, despite the difficulty of working with VBA on the Mac, I
actually really enjoyed programming using that language. REALbasic is quite
similar, but not quite as elegant IMO.

And I think I prefer both to AS.

But as always there is no accounting for taste. And in the end I'll use
whatever works.

As I mentioned to you also privately. there's one more alternative:

"has" (= Hamish Sanderson) has developed a Python framework called
"appscript" that lets you do application scripting - i.e. using the same
commands, classes, etc as AppleScript - using Python instead. Since Python
is a .dot language with resemblances to VBA but more logical - you might
prefer it to AppleScript. Perhaps you already know Python, which would make
it even easier. appscript has received very wide praise in the Python
community.

http://appscript.sourceforge.net

It has excellent documentation too.


In fact, with VBA gone, will OLE still be used in Office? Maybe AppleScript
will become the only model used in the next version for interapp
communication: wouldn't that make sense?

AppleScript hooks into OLE. Yes, OLE will continue to work, but MS has not
(so far) published an API for it publicly. However, it does appear that they
exposed the API to RealBasic back in 2000 or so, when they were getting
Office v. X ready, they gave some support to RB (notice the "RealBasic
Editor" menu item in Tools and the Lite version of RB that they shipped with
Office) in the hope that developers would switch to RB and RB would shoulder
the programmability issues. It didn't work out that way since cross-platform
developers preferred to continue using VBA and Mac-only developers prefer
AppleScript, which they provided for in 2004. But now that VBA will be going
away, it's possible that RB might be able to fill the gap. It's just that
nobody knows if their compiler is independent of the CPU or not. It probably
has to be since it can already work on both PPC Macs and Windows computers.
But some adjustment will undoubtedly have to made for Intel Macs, only
nobody knows yet if that's a small adjustment or a huge one, nor whether
it's being done or not.

Eventually (but no one knows how long) in some future version of Office Mac,
some version of .NET will be implemented for Office Mac, when there's a
Microsoft-supported CLR for the Mac (they're working on that now). When
Office Windows also switches to that, Mac and Windows programming will be
compatible again. (Yes, there's VB.NET already, but apparently there are
some flaws. Anyway, no one knows yet what the final setup will be.) All
these issues have been discussed here:

http://www.schwieb.com/blog/

(i.e. http://www.schwieb.com/blog/2006/08/08/saying-goodbye-to-visual-basic/
and
<http://www.schwieb.com/blog/2006/08/10/so-tell-us-what-you-want-what-you-re
ally-really-want/> )

and here: http://blogs.msdn.com/rick_schaut/archive/2006/08/09/693499.aspx



--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.

.



Relevant Pages

  • Re: applescript discussion
    ... and have been wondering if applescript might be a more ... mean or want to start a comparison of python and applescript, ... If you are just learning programming and want to learn a clean modern ... language, Python or Ruby are both excellent choices. ...
    (comp.sys.mac.system)
  • Re: applescript discussion
    ... and have been wondering if applescript might be a more ... mean or want to start a comparison of python and applescript, ... If you are just learning programming and want to learn a clean modern ... language, Python or Ruby are both excellent choices. ...
    (comp.sys.mac.system)
  • Re: Sort of OT : advice sought to teach Windows basics to technophobe
    ... Programming at the local college, ... an icon into the trash can just to remove the icon from the desktop and ... If you drag an icon to the trash, that means you probably don't want it ... But the thing I like about the Mac is that somewhere in the world ...
    (sci.electronics.design)
  • Re: A new Switcher
    ... lot of fun using it and tinkering. ... Is this the best place to get mac info, ... but most people coming from Windows love it too. ... syntax highlight a lot of different programming and web ...
    (comp.sys.mac.system)
  • Re: Can one presentation be embedded within another?
    ... Applescript vs VBA ... Once you learn AppleScript you'll be able to script lots ... Applescript manipulates the Excel and PowerPoint ... Applescript is Mac only. ...
    (microsoft.public.mac.office.powerpoint)