OS X Technologies :: Creating Folder Names With Variables In Applescript?
May 30, 2012
im trying to make folders and name them with structured names but im getting an error and im not sure what im doing wrong. Â
the error i get is:Finder got an error: Can’t make "/Users/USERNAME/Desktop/Fake Server/Project Name" into type item.  ----------------------these variables are just used for my example, the actual script asks for input and makes that into the variables ------------------- set the_folder to "Macintosh HD:Users:USERNAME:Desktop:Fake Server"set theChosenOne to "Selected"set Code to "ABCD"set Number1 to "12345" set projLocation to (POSIX path of the_folder & "/" & theChosenOne)set folderTags to Code & " " & Number1 tell application "Finder" make new folder at projLocation with properties {name:folderTags & " artfile"}end tell
Info:
Applescript, Mac OS X (10.7.4)
View 6 Replies
ADVERTISEMENT
Feb 10, 2012
That pretty well some it up. I've looked and looked and it seems this is not an easy thing to do! I guess the Proper() function from Excel doesn't exist in applescript?
Info:
Mac OS X (10.7.3)
View 3 Replies
View Related
May 17, 2012
I need to move one or more files inside a folder to another folder.
View 4 Replies
View Related
Mar 13, 2012
I have thousands of music projects with a somewhat fixed folder hierarchy and I'm trying to first rename and then extract (move) certain files from their original location.Â
Here is the most common example of the hierarchy: ProjectName/Info/Setups/fixed name file (either a pdf, txt or jpg)Â
My goal is to have these files renamed after their parent folders, all the way up to the Project Name and then have them moved to a set folder, out of this dull dictatorship I've created, so my files would end up with a name like this:Â ProjectName - Info - Setups - fixed name fileÂ
Info:
iMac 20'', Mac OS X (10.6.8)
View 2 Replies
View Related
Jun 27, 2012
if there is a way of having a list of image file names, searching for the images then putting them into a new folder? I'm guessing it can probably be done through mac scripting but I know nothing about scripting and genreally not great with technogy so ideally need step by step instructions!
View 6 Replies
View Related
Jul 3, 2012
I have a folder with mulitple subfolders. Each one has a different number of files in it. I want to use Automator or Applscript to summarize the contents into a text file or email:Â
folder 1 name / number of items
folder 2 name / number of items
folfder 3 name / number of itemsÂ
etc.Â
Info:
Mac Pro, Mac OS X (10.6.4)
View 4 Replies
View Related
May 10, 2012
Our environment has multiple Windows file servers, both 2003 and 2008. If one of these SMB shares is accessed from a Mac and the user creates a folder, will the ACLs on the share that are set to cascade actually cascade to this newly created folder? We've had issues in the past where ACLs that are supposedly set to cascade on a shared folder are not present on sub-folders created from Macs.Next question: if the share resides on a netapp device, do the same rules apply? The Macs are still connecting to these shared folders using the SMB protocol. All Macs are bound to our 2008 AD domain and use network accounts with local homefolders. The issue seems to happen when one or both of the following things happen:
1. A Mac user copies/creates a folder on a Netapp share and for some reason it doesn't inherit rights correctly
2. We move the folder from one share on an actual Windows server to the Netapp and it doesn't take permissions correctly.
Info:
MacPro 2x2.66GHz Dual Core Xeon, 4GB RAM,, Mac OS X (10.6.8)
View 2 Replies
View Related
Jun 1, 2012
I'm traveling tomorrow to Europe and am only taking my iPad and camera. I'm planning on using an SD card reader to upload my photos/videos to my iPad, then use Dropbox on the iPad to copy my daily shots to my Dropbox account. I'm thinking that I'll have an AppleScript on my home computer's /Dropbox/europe/ folder to look for newly added data and then auto import that into iPhoto. What's the best way to handle this? I got it working with a couple of test images but when iPhoto sees photos that it's already imported it asks me if I want to import in the duplicates or skip them. I'd like to skip them or write the AppleScript in a way that handles this. I'm also fine with copying the photos out of the Dropbox folder into a separate folder elsewhere and not using iPhoto. I'm just trying to theft proof my data in case my iPad gets stolen or if my Dropbox goes goofy and deletes the photos. Maybe copy newly added data to a designated directory outside of the Dropbox folder? How can I do this?Â
Info:
iMac, Mac OS X (10.6.8)
View 2 Replies
View Related
Apr 28, 2012
is there a simple way to upload some file on ftp with an applescript?
View 2 Replies
View Related
Apr 12, 2012
I created this piece of code using AppleScript Editor on OS X Lion 10.7.3 and I want to make it automatically repeat itself every 10 seconds. The code is supposed to reload the tab which the user is currently on every 10 seconds. I made the reload part but can't figure out how to make it reload every 10 seconds after extensive googling. Here is the code, can someone add the needed code it to make it reload the current page every 10 seconds and reply to me please.tell application "Safari" activateend tell tell application "System Events" tell process "Safari" keystroke "r" using {command down} end tellend tell
Info:
MacBookPro, Mac OS X (10.7.3)
View 3 Replies
View Related
Feb 3, 2012
I need an applescript that can click on certain points over and over again.
Info:
MacBook Pro
View 7 Replies
View Related
Mar 14, 2012
This works except for the exit quick mask mode.Anyone else been able to do it? tell application "Adobe Photoshop CS5.1" activate tell front document if (quick mask mode) then exit quick mask mode.end tellend tell
View 2 Replies
View Related
Mar 15, 2012
I am using a script that Jacques Rioux kindly helped me out with a couple days ago. I altered his script a little to complete a different task I needed to create a shortcut for. The script below first creates two folders (TIFF & JPEG) and then it sorts files with an extension .tif into the 'TIFF' folder and files with the extension .jpg into the folder named 'JPEG'. This works great but I would like the script to effect multiple folders. Can anyone help me add to the script so when you click it, a prompt will pop up allowing you to choose multiple folders to apply the script too? As of now it will only work on one folder at a time.
Info:
MacBook
Pro, Mac OS X (10.6.8)
View 2 Replies
View Related
Mar 20, 2012
I'm trying to automatically convert Excel files to PDFs using Automator. Although, every time the Excel file is opened, I get a message about links to other workbooks. I really don't care about these links and just want to convert the file to a PDF. I just can't get Automator to press the "Ignore links" button on the Excel message.Now I've found out that pressing the escape key on my keyboard activates the following buttons on the Excel message about the links:
- "Update links" (then there's a Finder window popping up)
- "Cancel" (the search for other workbooks) (another Finder window pops up)
- "Cancel" again
Then Excel opens up the file I need to convert, so I can actually convert it using Automator and do whatever I want with it.I have absolutely no experience using AppleScript.Is there a way to make a AppleScript that presses the escape key three times, so that Excel just opens my file?
Info:
Mac OSX Lion Server, Mac OS X (10.7.3)
View 4 Replies
View Related
Mar 25, 2012
I'm trying to play a new track on a playlist every 30 seconds. Thought I'd play around with AppleScript. Here's what I've got: on run {input, parameters} (* Your script goes here *) tell application "iTunes" play track 1 of playlist "Night"   end tell  repeat 10 times delay 30 tell application "iTunes" next track end tell end repeat return inputend run This sort of works, but not until the 4th track on the playlist. It seems to play the first three for a few seconds, but passes over them very quickly (not 30 seconds).
View 5 Replies
View Related
Mar 26, 2012
I am currently getting to grips with applescript. I have created some documents using pages 09 and pull in a couple of charts onto these doc's using Numbers 09. I am trying to find the applescipt command that tells Page 09 to Refresh or Sync the data from Numbers 09. you can do it manually by cliekc ing the Sync/Refrresh arrow thingies but i cant find a way to automoate it
Info:
Applescript, Mac OS X (10.7.3)
View 1 Replies
View Related
Mar 29, 2012
This is probably very easy but I just can't get my attempts at applescript to work. I normally use Windows but the Apple server hosts our phone system and I've been told I have to delete all old voicemails for data protection reasons. I would like to delete all WAV files in a folder tree over 90 days old and have this script run once a week. The folder is on a disk called Vision Array, and the folder path is Vision, Voice, Voicemails with subfolders 2010, 2011, 2012, each with folders within them.
The folder seems to have some sort of security on it that only allows the Vision user to modify it. I know the Vision password. I've tried do shell scripts find -type f -exec rm etc but get syntax errors. I've tried delete every file whose modification date is less than etc but get errors saying the modification date couldn't be turned into Unicode. I also couldn't get this to recurse folders.
Info:
Xserve
View 7 Replies
View Related
Apr 19, 2012
I'm creating an AppleScript application bundle that relies on a separate application. I want to add this application to my bundle and then call it via "tell application xyz ... end tell"Â
So far I have been unable to make AppleScript see this application, except when I gave it the absolute path of where it is located. Obviously, as soon as my application bundle is moved to a different directory this will not work anymore so is not a solution. Tinkering with "path to me" and thus creating the current path to the bundled application also does not work, when saving the script, ScriptEditor tries to find the application and see if the commands I want to tell it exist btu fails and consequently does not save.Â
I tried putting the application into the Contents, Contents:MacOS, and Contents:Resources folders, all without success.Â
View 9 Replies
View Related
Apr 25, 2012
Im using package maker and has a script to create my alias, but i am relatively new, and want to change the alias' icon to my applications supposedly icon.
as my app is base on HTML5 thus we are using the browser to open the app
Info:
Applescript
View 1 Replies
View Related
May 5, 2012
I use the create calendar with name "" and it makes it "On My Mac". Is there any way to make it in iCloud instead?
Info:
Mac Pro, Mac OS X (10.7.3)
View 2 Replies
View Related
May 23, 2012
I have to realize a user-based firewall with a draytek vigor 2850 router. Therefore every user has to login at the router during startup with a individual telnet parameter sequence. With the Terminal application the following procedure works fine.Â
ADCT-iMac:~ Lucky$ telnet 192.168.3.1
[Code]...
View 3 Replies
View Related
May 25, 2012
I am currently using automator to make folders named after the large numbers of images. I have everything set up and its working great but I am trying to make it more efficient.Â
The images follow a filename structure such as:Â
bmz12345_black_1.jpg
bmz83762_blue_3.jpg
bmz83762_blue_1.jpg
bmz09990_yellow_5.jpgÂ
I strip the filename to just the first part of the code eg "bmz12345" and make the folder from that.Â
However, In order to do this I have to create a dummy text file or folder somewhere named after the fulle code (bmz12345_black_1) and then strip it down (bmz12345) set a varible of the new filename and then create the folder in the desired location with the right name.Â
After getting the name of a finder item, Is it possible to change the text that is passed to it without creating a file out of it first?
Info:
Automator, Mac OS X (10.6.8)
View 2 Replies
View Related
Jun 2, 2012
How to achieve that. I have hundreds of notes and decided to change my tagging system.
View 8 Replies
View Related
Jun 12, 2012
I would really like for the Faces pane in iPhoto to sort the faces based on how many photos there are of that person, i.e., the person with the most photos would be first in the list, the person with the second most photos would be second, and so on. I feel sure that it is possible to write an applescript that would do this, but I have almost no experience with applescript. I have 688 faces, so sorting alphabetically mixes my loved ones in with people that have very few photos, while sorting manually is tedious and needs constant updating.Â
1. Is it possible to do make iPhoto sort in the way I want, either with an applescript or by some other method? and 2. if it is possible, how do I find someone who can write the script for me?Â
View 1 Replies
View Related
Jun 18, 2012
I am trying to write a generic script that will mount a disk upon log in of a user So far I have this: (which works for a specific user:)Â
try
mount volume "smb://MyUserName:MyPassWords@ServerIAmPointingTo"
end try Â
I have pointed the script to my log in prefernces so it runs automatically when I log in. Is there a way to do this with a generic username/password? If I wanted to give this script to 100 of my co-workers, they would all have to modify the code to their credeintals. But is there any defaut usernames or passwords that AppleScript will take?  Maybe something like: mount volume "smb://default:default@ServerIAmPointingTo" ...? My goal for this script is to have it run on peoples desktops at work to point to the same server, since I work in IT. But, I don't want to modify each script for each unique person.Â
View 1 Replies
View Related
Jun 21, 2012
How can one count only visible folders (one level down only) in the Finder?Â
The following script works fine except that it appears to count some invisible folders eg: when the selection is the startup disk the count is 6 although the actual number of visible folders is only 4. tell application "Finder"         set vSelection to selection as alias count every folder of folder vSelectionend tellÂ
I have tried various ideas such as "whose visible is true" but to no avail.Â
Assuming it is possible to perform a successful visible folder count, how could one then move between these visible folders in the Finder prior to performing a command (eg: open)?Â
View 2 Replies
View Related
Jul 6, 2012
I have never worked with applescript before, so I am completely lost. I have a program that does not like to be open when the computer goes to sleep. I usually remember to close the app, but sometimes I forget and get myself in trouble. If I do forget, very bad things can happen to the database of the program, so it is imperative that it is closed.
I am hoping there is an applescript that will quit the application if I put my laptop to sleep, usually by closing the lid. I don't want to trigger the sleep with the applescript, just something that will see that the computer is going to sleep and quit the application before it happens. Is this possible, and if so, how do I go about doing it?
Info:
MacBook Pro (15-inch Mid 2009), Mac OS X (10.7.4)
View 1 Replies
View Related
Jan 31, 2012
I'm currently writing a GUI applescript program, and I wondering if there was a way to intercept the red "X" button being clicked. I would like to execute my own code before the window closes. If that's not possible, is there a way to make the application quit when the window is closed, like in System Preferences.app?
View 1 Replies
View Related
Apr 15, 2012
I'd like to know if it is possible to detect if something is attached to the serial port.
I have two USB uart which are connected to my mac mini. They are recognized by the serial port as "usbmodem" and then a number. I'd like to restart my computer is the Mac doesn't see them both.
Info:
mac mini, Mac OS X (10.6.4)
View 7 Replies
View Related
Apr 27, 2012
I'm just wondering if an applescript could be able to create setup and start a private network.
Info:
mac mini, Mac OS X (10.6.4)
View 8 Replies
View Related