|Jul 16, 2009, 08:05 AM||#1|
Script to create multiple apps
I need to create over 300 apps using applescript editor.
Each App will have the following:
tell application "Finder" to open file "File_Name-1.pdf" of folder "fscommand" of disk "DISKNAME"
The File_Name-1.pdf (including the extension) will change from an app to another.
Then this script needs to be saved as an application with ONLY RUN option and named filename1pdf.app - so I am changing all to lower case and stripping the "-", "_" and "."
Is their a way to automate this process without creating every single script and saving + renaming individually?
Any help will be much appreciated.
|Jul 16, 2009, 08:19 AM||#4|
Okay. Fire up automator and you'll be asked to 'choose a starting point'. Select 'Files & Folders'. It'll ask you to select your files, you can do so now, or you can select/drag it into the list later (under 'Get Specified Finder Items'). Now, in the leftmost column you'll see a list of programs. Click on Files & Folders. In the second column find and drag 'Rename Finder Items' into the larger area on the right, under the existing list. It'll ask if you want to put something extra to copy the files. That's up to you. You'll need to drag 2 more below since you're doing three changes to the file name. These times select 'Don't Add'.
You'll see options for renaming: you're looking for 'Change Case' and 'Replace Text'. Change case is trivial, just choose Full name and lower case as options. Replace Text you need to put "-" in 'Find' and leave 'Replace' blank. The third rename is for your replace "_" with a blank.
Hope this makes sense.
I can also make this 'workflow' and send it to you as well. Download this, it will open in Automator. Have a look at it then run it.
Last edited by sammich; Jul 16, 2009 at 08:39 AM.
|Jul 16, 2009, 08:43 AM||#5|
Thanks a lot buddy but it seems I completely confused you
I already have the file names and the names of the .app i need to create:
10secrethidingplacepptx - 10SecretHidingPlace.pptx
10timeforschoolpptx - 10TimeForSchool.pptx
1tableswhatsmyquestionpptx - 1TablesWhatsMyQuestion.pptx
1whatsmywordpptx - 1WhatsMyWord.pptx
2coolcollectivenounspptx - 2CoolCollectiveNouns.pptx
2coordinatesmppptx - 2CoordinatesMP.pptx
I actually need to automate the creation of the .APPs in the Script Editor.
Sorry for the confusion again - apologies!
|Jul 16, 2009, 09:28 AM||#6|
Well, it appears I'm a victim of my own skim reading
Okay, give me a minute now lol
Almost seems like you could've done this already without my help...
Last edited by sammich; Jul 16, 2009 at 09:34 AM.
|Jul 16, 2009, 09:40 AM||#7|
I am manually creating the Apps in the Script Editor at the mo because I got to deliver today - can't risk it! - however this will take me hours ....hope you will come up with a solution that will save me individually creating the remaining 253 Apps!
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Anyone know where I can hire/commission a task to create script?||Lifequest||Mac Programming||2||May 23, 2011 01:52 PM|
|Bash script to zip multiple directories?||splitpea||Mac Programming||2||Apr 4, 2010 03:05 PM|
|Automator Action or Script to create a PDF of monthly iCal calendars||zandrew||Mac Applications and Mac App Store||0||Feb 19, 2010 04:53 PM|
|Question about Dock and creating multiple apps lists||Cudadown||Mac Basics and Help||2||Jan 1, 2008 01:23 AM|
All times are GMT -5. The time now is 06:43 PM.