I need to parse the first 10 chars of a file name to see if they are all digits. The obvious way to do this is fileName =~ m/^\d{10}/ but I'm not seeing anything regExy in the applescript reference, so, I'm curious what other options I have to do this validation.
...
I'm trying to set the tracks of a user playlist using AppleScript. I don't want the tracks to be added, I want them to replace the current tracks. Before I do that, I need to look up the tracks by their persistent IDs, which is working fine, but the statement that sets the tracks isn't working. Code snippet below:
set fixed indexi...
I use emacs on my mac to program in Xcode. It works really well for the most part. I double click on a file in xcode, and it pulls it up in an existing emacs window. I compile, and get syntax errors, double click, and they come up in the active emacs window. great.
This is all XCode talking to emacs. Does anyone know of a way to get ema...
I have made a short applescript that sends an email with attachment. Now I want to integrate this script in my cocoa application. I have tried the following code that i found on the internet:
NSAppleScript *mailScript;
NSString *scriptString= [NSString stringWithFormat:@"the applescript"];
mailScript = [[NSAppleScript alloc] initWithSou...
I have made a short applescript that sends an email with an attached vcs-file. Now I want to integrate this script in my cocoa application. I have tried the following code that i found on the internet:
NSAppleScript *mailScript;
NSString *scriptString= [NSString stringWithFormat:@"the applescript"];
mailScript = [[NSAppleScript alloc] i...
The following are the steps I would like to have:
launch xcode
open a specific xcodeproj file
build and debug it
quit xcode
The following is my first attempt to write AppleScript:
tell application "Xcode"
tell project "iphone_manual_client"
debug
end tell
close project "iphone_manual_client"
end tell
This only wor...
Hi, I have a simple 'repeat with' in an AppleScript, and would like to move on to the next item in the "repeat" conditionally. Basically I'm looking for something similar to "continue" (or break?) in other languages.
I'm not well versed in AppleScript but I have found it useful a few times now.
...
I am trying to export a snapshot of a movie using Quicktime. This is the code that does the snapshot:
export document 1 to file target_file as image sequence using settings "JPEG, 10 fps"
This saves the image as PNG rather a JPEG file.
When I use the below code:
export document 1 to file target_file as image sequence using setting...
I Have a folder full of images and I need to create a text file of all the image names with applescript. Is there some way with Applescript to read in all the file names there are about 10k of them and then output this to a text file? Any help would be great! Thanks for reading.
...
Each camera folder has many thousands of photos, I need to open 20-or so specific files which could be located in any one or more folders, all within one 'root' folder:
Photos
|-- CameraA
|-- CameraB
|-- CameraC
I'd like to paste a CSV of the filenames (eg 6504, 6505, 8902, 4501) into an Applescript (or preferably if...
Hi All,
I have to write a small script to deploy a patch for our Application. The patch
will replace a couple of files in the application.I decided to depploy the patch using Applescript. The files to be copied are quite large and it takes some time for the files to be copied. I wanted to know if there is any way I can get a dialog box...
Hi,
I frequently reboot into Windows on a bootcamp partition in my Mac Pro (e2008) (Mac Os X 10.5.6). Because I like to use the time it takes to reboot for other things instead of just sitting around I'd like to write/execute a simple applescript that would basically do:
Quit all running user applications
Then*—after the apps have bee...
What I'm trying to do is:
set x to current selection, then advance the selection to the next file and then delete x.
I'm doing this because CMD-backspace clears the selection every time and that's annoying!
...
I'm trying to emulate Xcode's ⌘-R keystroke in another editor (namely, Vim); I thought I would be able to do this with some shell scripting & applescript, but it doesn't seem to be working correctly:
open -a Xcode "MyProj.xcodeproj"
osascript -e 'tell app "Xcode"' -e 'build' -e 'launch' -e 'end tell'
The problem with this is it launch...
I need some way to determine if a particular file exists. If it exists do one script if not then do another script. Here was my logic in applescript:
If exists "File:Path:To:theFile"
tell application "Finder"
open "File:Path:To:the:script"
end tell
else
tell application "Finder"
open "File:Path:To:the:Anotherscript"
end tell
end if
...
I want to extract the timecode from a quicktime movie in Applescript.
By using this script
tell application "QuickTime Player"
set themovie to open thefile
set thetracks to tracks of document 1
repeat with thetrack in thetracks
if the kind of thetrack is "Timecode" then
get the properties of thetrack
end if
...
All,
I have the challenge in AppleScript to manipulate a string as follows:
Base string is an email recipient display name, say "First Last ([email protected])"
I'd now like to "trim" the display name to remove the actual email address in the brackets
The desired result should be "First Last" - so also the space in front of the f...
I want to program my mouse button to show/hide the Finder. I wrote the following AppleScript and bound it to my mouse button:
tell application "System Events"
--When this script is run,
-- the frontmost application will be this script itself
--Get the name of this script as it is running and hide it,
-- so that the pr...
How do you add and manipulate images on a window with AppleScript Studio?
Ideally I'd like to have an image display on the window and change it to a different image using applescript. I've added an image view in interface builder, but that's about as far as I have gotten.
...
Mac has applescript 'built in' and I've found its pretty nice to work with for automating stuff.
What's the best windows equivalent?
...