Questions tagged [script]

A collection of commands that may be from a CLI Shell, or programming language such as AppleScript, which are executed in order with limited iteration, usually as a way of automating actions or events.

769 questions
6
votes
6 answers

Center Window on Screen

I'm creating a few screen casts and wanted to exactly center my windows in my screen. Any good way to do this on the Mac? I found an Apple Script example (and a few linked screens) but none of them support centering 'Terminal' vertically (although…
1
vote
1 answer

How do I parse lsappinfo output?

There's a nice lsappinfo tool that lets you do things like monitor for app switching. I'd like to write a program that runs lsappinfo listen and takes actions when the foreground app changes (specifically, change LED colors on my new keyboard). Does…
1
vote
1 answer

Delete folder with specific condition

I need a script to delete a folder, only if the folder does not contain media files with extension avi or mp4.
Edgard
  • 11
0
votes
1 answer

How can I write an Apple Script in order to check if bluetooth and ethernet are on or off?

I'm trying to write a little script in order to check whether or not bluetooth is on and whether or not an ethernet cable is plugged in. I searched the System Preference dictionary built in the app but it seems there isn't any help about checking if…
-1
votes
1 answer

Extract lines from txt file and save as new txt

I have a xyz.txt file looking quite like this: 001this is line one 002this is line two 003and this is line three 004and so on Now I need all those lines as a single txt without the three digit prefix, like: lineone.txt this is line…