RosettaCodeData/Task/String-prepend/AppleScript/string-prepend-4.applescript
2023-07-01 13:44:08 -04:00

6 lines
264 B
AppleScript

use AppleScript version "2.4" -- OS X 10.10 (Yosemite) or later
use framework "Foundation"
set aVariable to current application's class "NSMutableString"'s stringWithString:("world!")
tell aVariable to insertString:("Hello ") atIndex:(0)
return aVariable as text