applescript
display dialog "This is just a test." buttons {"Great", "OK"} ¬
applescript
display dialog "This is just a test." buttons {"Great", "OK"} ¬
run an applescript
on run {input, parameters}
tell application "Finder"
--get the selected file
set selectedItem to (item 1 of (get selection))
--get location info (folder:file format)
set fileLocation to (selectedItem as alias) as string
--replace : with / with subroutine
set the semifinal to my replace_chars(fileLocation, ":", "/")
--remove Macintosh HD with subroutine
set the theFinal to my replace_chars(semifinal, "Macintosh HD", "")
end tell
do shell script "osascript " & "\"" & theFinal & "\""
return input
end run
on replace_chars(this_text, search_string, replacement_string)
set AppleScript's text item delimiters to the search_string
set the item_list to every text item of this_text
set AppleScript's text item delimiters to the replacement_string
set this_text to the item_list as string
set AppleScript's text item delimiters to ""
return this_text
end replace_chars
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us