Mac Can this be Applescripted?

SuperChuck

macrumors 6502
Original poster
Nov 15, 2003
299
0
Chucktown, SC
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.
 

SuperChuck

macrumors 6502
Original poster
Nov 15, 2003
299
0
Chucktown, SC
Even simpler, is there an Applescript command that selects 'X' number of lines in a given document? I could do the rest, I imagine.
 

sphereboy

macrumors 6502
May 10, 2002
301
0
MIAMI.FL.USA
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.
 

superbovine

macrumors 68030
Nov 7, 2003
2,872
0
sphereboy said:
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.
http://cocoaobjects.com/applescript/ics/index.php
http://www.dougscripts.com/
 

superbovine

macrumors 68030
Nov 7, 2003
2,872
0
SuperChuck said:
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.
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.
 

sphereboy

macrumors 6502
May 10, 2002
301
0
MIAMI.FL.USA
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.