Can this be Applescripted?

Discussion in 'Mac Programming' started by SuperChuck, Jul 22, 2005.

  1. SuperChuck macrumors 6502

    SuperChuck

    Joined:
    Nov 15, 2003
    Location:
    Chucktown, SC
    #1
    At my job, I am constantly working with enormous sql queries. Whenever I do not have SSH access to a server, I am required to use phpMyAdmin, which times out with such large files, so...

    Is there a way that I could write a simple script (or use automator) to ask me how many pieces I would like a file broken into and then it would divide the text file into smaller files with a numbering system (file_1.sql, file_2.sql, etc).

    I have BBEdit and QuicKeys, as well.

    I can do everything except command it to select a specified portion of text. It is also essential, obviously, that it only divide at line breaks.

    Any ideas? Thanks in advance for pondering this one.
     
  2. SuperChuck thread starter macrumors 6502

    SuperChuck

    Joined:
    Nov 15, 2003
    Location:
    Chucktown, SC
    #2
    Even simpler, is there an Applescript command that selects 'X' number of lines in a given document? I could do the rest, I imagine.
     
  3. ehwizard macrumors newbie

    Joined:
    Jan 28, 2003
    Location:
    New York, NY
    #3
    Why not just use perl or a shell script using tail/head? If you have access to applescript you probably have access to that.
     
  4. sphereboy macrumors 6502

    sphereboy

    Joined:
    May 10, 2002
    Location:
    MIAMI.FL.USA
    #4
    I'm dying for some AppleScript guidance.
    I hope someone can help me out. I haven't found many resources talking about AppleScripts.

    I'm trying to make an AppleScript to change a preference within iChat.
    I would like to make the script change the Security setting from Allow anyone to Block specific people.

    Is this possible?
    Any help, suggestions is greatly appreciated.
     
  5. superbovine macrumors 68030

    superbovine

    Joined:
    Nov 7, 2003
    #5
    http://cocoaobjects.com/applescript/ics/index.php
    http://www.dougscripts.com/
     
  6. superbovine macrumors 68030

    superbovine

    Joined:
    Nov 7, 2003
    #6
    write some php software to handle all your queries. if you myphpadmin access you write a php script to do it. hell you even write it in perl.
     
  7. sphereboy macrumors 6502

    sphereboy

    Joined:
    May 10, 2002
    Location:
    MIAMI.FL.USA
    #7
    i wish DougScripts starting playing with iChat :rolleyes:

    Thanks Superbovine for the links. I was there recently. Didn't help me too much, i have to decipher all that stuff. I'll keep trying.
     

Share This Page