Created
January 25, 2020 08:00
-
-
Save logic2design/1dae1ec2c770303bc55b162afdf6dd23 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Finder" to set shortName to name of (theFile as alias) | |
set theDialogText to "What is the Project name? - " & shortName | |
set theButtonIfPressedTheRuleWillContinue to "Next" | |
set theButtonIfPressedRuleAborts to "Skip" | |
set theDialogTitle to "Rename Folder" | |
tell application "System Events" | |
activate | |
set theResult to (display dialog theDialogText with title theDialogTitle default answer "" buttons {theButtonIfPressedTheRuleWillContinue, theButtonIfPressedRuleAborts} default button 1 giving up after 60) | |
end tell | |
if (button returned of theResult) is theButtonIfPressedTheRuleWillContinue then | |
set theText to text returned of theResult | |
return {hazelExportTokens:{Projectname:theText}} | |
end if | |
return {hazelExportTokens:{Projectname:""}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment