Guest User

Untitled

a guest
Apr 16th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # requires py-appscript. assume this also will only run on >10.5.6 (or something modern)
  3. # I always wanted a cli tool to "dump" browser states without attempting to get into the complexities of
  4. # a particular datastore, given the concurrent usage of multiple browsers, each for specific tasks.
  5.  
  6. import appscript
  7. print appscript.app("Camino").windows.first.current_tab.URL()
  8.  
  9. # real easy, cuts the applescript junk, and the dictionary/translate tools provide you with it all.
  10. # now suckfari
  11.  
  12. import appscript
  13. print appscript.app("Safari").windows.first.current_tab.URL()
Add Comment
Please, Sign In to add comment