Created
May 28, 2020 12:11
-
-
Save mingsai/9d7da9f95060955f839e09b968fb876d to your computer and use it in GitHub Desktop.
Applescript: Trim the last three characters from text input
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
on run {input, parameters} | |
set output to ((characters 1 thru -4 of (item 1 of input as string)) as string) | |
--set output to (item 1 of input as string) | |
(* Your script goes here *) | |
(* if output ends with ".js" then | |
set output to ((characters 1 thru -4 of output) as string) | |
--display dialog updated | |
end if | |
*) | |
--display dialog output | |
--replace_text(input, ".js", "") | |
return output | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment