Re: can this be simplified?
Re: can this be simplified?
- Subject: Re: can this be simplified?
- From: Tommy Bollman <email@hidden>
- Date: Mon, 2 Aug 2010 20:16:07 +0200
Hello Vincent.
I think that would depend upon what the input looked like!
On 2 Aug 2010, at 19:59, Vincent wrote:
> set JobBagName to (the clipboard as text)
> set AppleScript's text item delimiters to {" ", ".", ":", ";", "-", ","}
> set finalName to text items of JobBagName
> set AppleScript's text item delimiters to "_"
> set JobBagName to finalName as string
> set newName to result as text
> set AppleScript's text item delimiters to {"___"}
> set new to text items of newName
> set AppleScript's text item delimiters to "_"
> set newName to new as string
> set newName1 to result as text
> set AppleScript's text item delimiters to {"__"}
> set new2 to text items of newName1
> set AppleScript's text item delimiters to "_"
> set newName1 to new2 as string
>
> display dialog "Name of New Job Bag - Nouveau Dossier" default answer newName1 buttons {"OK", "Cancel"} default button 1
> copy the result as list to {text_returned, button_pressed}
> set JobBagFinalName to text_returned
> choose folder with prompt "Select Folder for Job Folder Creation - Destination du Nouveau Dossier"
> set destination to result
> set posix_Dest to POSIX path of destination
> tell application "Finder"
> make folder with properties {name:JobBagFinalName} at destination
> set TheNewJobBag to result
> make folder with properties {name:"SourcesClient_" & text_returned} at TheNewJobBag
> open TheNewJobBag
> end tell _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
Best regards
Tommy Bollman
--------------------------------------------------------------------------------------------------
Mollison's Bureaucracy Hypothesis:
If an idea can survive a bureaucratic review
and be implemented it wasn't worth doing.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden