|Jul 16, 2009, 07: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, 07: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 07:39 AM.
|Jul 16, 2009, 07: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, 08: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 08:34 AM.
|Jul 16, 2009, 08: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|
|HELP- Want to learn how to code ios apps /create iphone apps||jaalle||iPhone/iPad Programming||12||Jan 27, 2014 11:35 PM|
|Create script to log malicious actions||Cecil888||Mac Basics and Help||0||Jan 7, 2014 11:33 PM|
|Auto-login Multiple users who then launch a script||RobQuads||Mac OS X Server, Xserve, and Networking||6||Oct 9, 2013 07:11 PM|
|How to create a shell script and run it?||Killwin98||Mac Programming||3||Mar 18, 2013 06:39 PM|
|Cannot create multiple buttons||Baddicus||iPhone/iPad Programming||5||Sep 6, 2012 09:05 AM|
All times are GMT -5. The time now is 06:50 AM.