TBH the end goal is for me satisfy my need to make Applescript do something weird and learn as I go. I'm a visual learner so reading syntax from man pages is about as confusing as algebra.......and I REALLY don't get algebra. :-P
So I scour the internet at night searching for the most random of code snippets to tear down and learn from. As far as my previous post I guess the initial goal is to just have the ability to surf the net and when I'm on a page I want to read later I can simply click my icon in the dock and it will create a file on the desktop (.webloc) that shortcuts to that URL. Perhaps I can save it to my Dropbox path and have it available to all of my other Mac's or just for archival purposes. I'm an avid user of Chrome out side of work and Firefox at work, both browsers offering a bookmark syncing service but this would be my of doing it, again mainly just to learn some new Applescript as I go.
What I put together this morning..
tell application "Google Chrome"
get URL of active tab of first window as text
end tell
tell application "Finder"
set goHome to (path to home folder as text)
set nextLvl to goHome & "Dropbox:Weblocs" as alias
set fullPath to quoted form of POSIX path of nextLvl
set fileName to POSIX path of (nextLvl & fileName & ".webloc")
end tell
It's missing pieces, like the definition of "fileName" but I'm getting things together. Assuming I can turn the URL into plain text and append .webloc on the end, saving it as a file in my Dropbox. Make sense?