• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: can this be simplified?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >can this be simplified? (From: Vincent <email@hidden>)

  • Prev by Date: can this be simplified?
  • Next by Date: Re: can this be simplified?
  • Previous by thread: can this be simplified?
  • Next by thread: Re: can this be simplified?
  • Index(es):
    • Date
    • Thread