SHARE
TWEET

Toggle Maps Location Circle

applehelpwriter May 10th, 2016 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #(c) Applehelpwriter 2016
  2. # This script toggle's the visibility of the blue location circle in Maps
  3.  
  4. on toggleLocation(aBool)
  5. if aBool is "1" then
  6. set aBool to 0
  7. else
  8. set aBool to 1
  9. end if
  10. do shell script "defaults write com.apple.Maps ShowsUserLocation " & aBool
  11. do shell script "killall Maps"
  12. delay 1
  13. end toggleLocation
  14.  
  15. try
  16. set _status to do shell script "defaults read com.apple.Maps ShowsUserLocation"
  17. on error
  18. set _status to "1"
  19. end try
  20.  
  21.  
  22. toggleLocation(_status)
  23. try
  24. tell application id "com.apple.Maps" to launch
  25. end try
RAW Paste Data
Top