Simple Programming on the Mac

Discussion in 'Mac Programming' started by SouthernAtHeart, Jan 5, 2012.

  1. macrumors newbie

    Joined:
    Nov 6, 2011
    #1
    I'm not schooled in programming, but self taught enough that I could write some VBA code in Outlook or MS Access to do things like import contacts from Outlook into Access and create a gpx file for GPS devices. Also I wrote little snippets like adding a button to outlook's toolbar that would add the current contact to a specified category. And numerous things in MS Word.
    Now switching to Mac, I'm mainly interested in if it's possible to do this type of thing in Pages. I'm really not interested in Office for Mac, though I see it has VBA. I'd like to get away from Microsoft.
    It'd be nice to be able to write little code and macros, though.
    Is this something possible without a huge amount of training in programming? I've done quite a bit of programming the Arduino, but that's my extent of C.
    Thanks for any suggestions.
     
  2. macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #2
    If the kind of programming you'd like to do is like the stuff you've already done, you should probably look at AppleScript. Many apps, both Apple apps and third-party apps, support it, and you can use it to automate all kinds of tasks on a Mac. If you're interested in learning to write full-fledged applications, you should learn Objective-C and Cocoa.
     
  3. thread starter macrumors newbie

    Joined:
    Nov 6, 2011
    #3
    ...no, not full fledged app, just little utilities to automate stuff. I found word on Objective C and Cocoa, which looks way over my head. But this AppleScript sounds like just what I might need! I'll check it out. Thanks.
     
  4. macrumors 603

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #4
    There's AppleScript for working with Apple's application.

    If you've used VBA, you might look into one of the simple Basic interpreters for the Mac do some really basic scripting without having to learn much of any new stuff.

    But Python on the Mac is likely to be both easy enough and more useful.
     
  5. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #5
    Note that OS X also comes with Automator which can handle a lot of the kind of stuff you are talking about.

    IMHO a key difference between Windows and OS X is in the system wide availability of tools like this. While VBA is embedded in certain apps, AppleScript and Automator act pretty uniformly everywhere. On Windows it always seems that the default is scripting off. (Yes. I know about WSH and VBScript)

    B
     
  6. macrumors 68030

    Joined:
    Oct 19, 2011
    Location:
    Switzerland
    #6
    Check Apple script and automator, as suggested above.

    You should take a look at Pages, but you might be in for a disappointment. MS Office seems to be more mature and powerful at this point, also because Apple's office suite is now three years without major update.

    I'm using keynote, which is much better than older powerpoint versions - however PP 2011 seems to be significantly improved. I never really got into Pages, it never felt as easy to use as openoffice or the old word versions I'm used to. With Exel vs. Numbers I don't have any experience.
     
  7. macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #7
    Old school. Up to date people talk about Power Shell. ;)

    Side note, I always preferred installing ActiveState's Perl distribution, which integrated PerlScript into the WSH. Microsoft always ship only the lamoid VBScript and JScript engines. Also enabled PerlScript as a valid ASP language in IIS, which was pretty nice in and of itself.
     
  8. balamw, Jan 5, 2012
    Last edited: Jan 5, 2012

    Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #8
    I should have added "or whatever they call it today." ;) it's still VBScript and JScript and never enable on the machine I need it on. :p (EDIT: I take that back I didn't realize that PowerShell allowed for any .NET language, including C#. I'll have to play with that.).

    ActiveState Perl is also on all my personal Windows installs, but I stay as far away from IIS as possible.

    B
     
  9. macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #9
    So do I, but I was forced once to write an ASP application (what a pain. Session this, Application that).
     
  10. Mark FX, Jan 6, 2012
    Last edited: Jan 6, 2012

    macrumors member

    Mark FX

    Joined:
    Nov 18, 2011
    #10
    I would also advise you learn some Applescript as well, get to grips with it in
    Applescript Editor.
    When you've learned Vanilla Applescript, you could then think of moving
    on to ApplescriptObjC which can also be written in the Lion version of
    Applescript Editor, or Xcode, ApplescriptObjC is an extension to the Applescript
    language that enables you to build full UI applications, and and uses the same
    Cocoa Frameworks as the ObjectiveC programmers use, but is much easier
    to learn, but you have to learn the basic Applescript language first.

    Regards Mark
     
  11. thread starter macrumors newbie

    Joined:
    Nov 6, 2011
    #11
    thanks, working on learning applecscript, now
     

Share This Page