Remove Applescript dependency for OSX method