Applescript resource recommendation (OT)

Search
Go

Discussion Topic

Return to Forum List
This thread has been locked
Messages 1 - 9 of total 9 in this topic
Ed Hartouni

Trad climber
Livermore, CA
Topic Author's Original Post - Dec 12, 2009 - 02:43pm PT
actually it may not be totally OT if I apply it to climbing like stuff...

what are the best references for Applescript? especially scientific applications in Microsoft Excel.

HighTraverse

Trad climber
Bay Area
Dec 12, 2009 - 06:20pm PT
Hey Ed
I'm assuming you've got 10.5 Leopard at least. 10.6 Snow Leopard has a lot more features. 10.4 will be difficult to learn.
Start with Automator
http://macosxautomation.com/automator/

Then Applescript for which you will want to install the XCode developer tools. They came free with your OS X installation disks. Not too bad a learning curve if you focus only on Applescript.
XCode developer tools includes Applescript documentation starting with "Applescript Overview" which you can also download pdf directly from Apple developer website.

As for Excel specific scripting, 2004 Office is VERY limited.
I think the newest Office/Excel is very powerful.

If you're not used to object oriented programming just keep in mind "send a message (with data) to an object".

There's a good O'Reilly book from 2005. The basic way Applescript works is unchanged. Just a lot more things you can do with it now. Automator is vastly improved in past 2 years. It's a user interface to build a lot of common workflows built on top of Applescript
Ed Hartouni

Trad climber
Livermore, CA
Topic Author's Reply - Dec 12, 2009 - 07:55pm PT
XCode is already running on my 10.5... and I have Excel 2008...
thanks!
froodish

Trad climber
Portland, Oregon
Dec 12, 2009 - 10:11pm PT
Ahh, Applescript, world's only read only language ;-)

+1 for Matt Neuburg's Applescript book. Matt's a great writer and probably knows more about Applescript than anyone on the planet.

You can get a sample chapter of the book here:

http://www.tidbits.com/matt/

If you're interested in automation and would like a language with more sane syntax, you might have a look at rbappscript:

http://appscript.sourceforge.net/rb-appscript/index.html

http://www.apeth.com/rbappscript/00intro.html

ryanb

climber
Seattle, WA
Dec 12, 2009 - 11:48pm PT
Excel is a really poor choice for scientific applications for a number of reasons:

It can't handle large datasets.
It can do weird things to your data ... some biology studies have been thrown off because excel parsed some gene names as dates.
Its closed source so you can never really verify it is doing what you think.
Researchers who use linux or otherwise don't have excel won't be able to use your code.
It lacks standard programing language features that will help you better organize your project.
It lacks even marginally advanced math functionality (even basic matrix math).

Writing in applescript + excel is going to further tie you to macs with excel which is not a big group.

If you are going to be learning a new language anyways, I would suggest you take a look at one of the open source languages/enviroments for math/scientific computing. There are a few but most of them share things like a vector/matrix math based syntax that mathematicians/physicists tend to like and built in (heavily optimized and compiled) functions for various mathematical building blocks that will save you a ton of time and run much quicker then anything you can write in a non math scripting language.

Two languages I would suggest you take a look at are:
R (http://www.r-project.org/); which is a wonderful language used mostly in statistics/computational biology. It has good excellent math functionality lots of advanced statistical analysis packages and really nice plotting and data importing but doesn't yet compete with closed source options (matlab) in terms of differential equation solvers.

and

Sage (http://www.sagemath.org/); which is a project to unite various open source projects under a common python based language providing a full fledged matlab/mathmatica/maple competitor. It is probably a better option if you are looking for things like an ode solver.

The learning curve will be a little steeper initially with either of these but as soon as you are up to speed you will find them much quicker for math stuff and you will be much less hindered in the long run.

Ed Hartouni

Trad climber
Livermore, CA
Topic Author's Reply - Dec 13, 2009 - 02:15am PT
thanks Ryan, I've got R...

but I need to do things in Excel too...
WBraun

climber
Dec 13, 2009 - 02:20am PT
Is this any good?

http://applescripts.thompson-solutions.com/applescript_reference_microsoft_excel_guide.php

http://www.microsoft.com/mac/developers/default.mspx
ryanb

climber
Seattle, WA
Dec 13, 2009 - 02:31am PT
I'm curious what features keep you tied to excel?

My interest is partially professional...I'm working as a software engineer making tools for systems biologists and other scientists. In my experience its soooo much easier too do analysis in R that I even use it for things like personal finance. It really surprises me how scientists will stick with excel even when they have to work around its shortcomings but I'm a software engineer so I tend to gravitate towards code over gui's anyways...
Ed Hartouni

Trad climber
Livermore, CA
Topic Author's Reply - Dec 13, 2009 - 02:43am PT
my experience has been writing analysis code in fortran and c (and some assembler), using PAW and a bit or ROOT, new to R.... also work in Perl... probably get involved with Python in the not too distant future.

But some of the people I deal with are more manager types than in-the-trenches scientists, they'd like to see some of the stuff too, so writing some code for Excel shouldn't be too too hard. If it were VBA no problem, but Microsoft has given up on it a while ago (while I wasn't looking) and now uses Applescript.

What I want to do in Excel is pretty simple, but it will require learning enough about Applescript to be a good place to learn.

We are promiscuous tool users... what ever gets the work done....

Messages 1 - 9 of total 9 in this topic
Return to Forum List
 
Our Guidebooks
spacerCheck 'em out!
SuperTopo Guidebooks

guidebook icon
Try a free sample topo!

 
SuperTopo on the Web

Recent Route Beta