Skip navigation

Applescript Connecting to MySQL database

611 Views 5 Replies Latest reply: Oct 15, 2012 8:13 AM by etresoft RSS
derekshull Calculating status...
Currently Being Moderated
Oct 13, 2012 8:03 AM

How do I get an applescript to connect to a database I have?  And then retreive the data and display it?  Is it possible?

Mac OS X (10.7.1)
  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Oct 14, 2012 2:59 PM (in response to derekshull)

    Not directly. I don't know of any scriptable apps that connect to MySQL. You could route things through "do shell script" and then have some Perl or Python script interact with MySQL.

  • twtwtw Level 5 Level 5 (4,580 points)
    Currently Being Moderated
    Oct 14, 2012 4:12 PM (in response to etresoft)

    That's funny. I've had a scriptable sql app on the back burner for a while now.  Maybe it's time I got off my you-know-what and actually finished it.

  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Oct 14, 2012 4:40 PM (in response to twtwtw)

    How far back? That seems like it could have real potential. Alas, I would never use it. I can barely get AppleScript to do anything. I can't come to grips with a language that requires you to cast strings as strings before you can use them as strings.

  • twtwtw Level 5 Level 5 (4,580 points)
    Currently Being Moderated
    Oct 14, 2012 6:33 PM (in response to etresoft)

    Low simmer.  I've been slowly puzzling over the best way to set up the applescript dictionary.  I suppose if I turned up the heat I could have a workable version in a week or two.

     

    When do you have to cast a string as a string in applescript?

  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Oct 15, 2012 8:13 AM (in response to twtwtw)

    twtwtw wrote:

     

    I suppose if I turned up the heat I could have a workable version in a week or two.

    I say crank it up. Make a general-purpose database interface with some admin capabilities for MySQL and SQLite. There are lots of similar apps. That will get your app in to the app store. Your killer feature would be the AppleScript interface.

     

    When do you have to cast a string as a string in applescript?

     

    In the last AppleScript I worked on, I had POSIX paths in strings but they wouldn't work until I cast them as strings.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.