|
|
Saving and restoring tabs in Safari, re: Save Dialog
Great hint! Being able to save the file to a desired location is perfect. Very useful if you want to open the info up somewhere else or just to have a bunch of safari link files sitting around. But I did notice that the last person to paste the script didn't use the NEW script. After I realized that the script didn't save tabs beyond one screen's worth of windows I discovered the error. So to add to the scripting madness already on this page, here is my version of the script, using the NEW script and the save file implementation. By the way the restore script still worked, but I edited it slightly with a tell block to bring the "Choose File Name" dialogue to the front. I also added this same tell block to the save script, so here they are again.
Save Script:
And now the Restore Script:
Saving and restoring tabs in Safari, re: Save Dialog
Two issues:
Other problems with this script and another revision.
I found a few problems with this, and presumably with all of the versions in the thread so far. I didn't actually read the last submission to see if it addressed any of the same issues.
1. If you have 2 tabs in the same window, one of which is the first tab and both have the same url in them, you'll stop collecting url's when you hit the second copy of the first tab. You could lose a whole lot of stuff without noticing it. I haven't yet figured a full fix for this. The right way to do it is to better identify the tab. 2. There's a big problem with PDF files and presumably other file types which may be loaded into Safari. When Safari loads these files it significantly changes the way it structures its list of windows, placing a new window in the list of active windows. The way this code is written it gets an unhandled exception when it tries to extract the url from such a page. 3. Another thing which would confuse this code is if you have a Download window opened. It will try to get a URL from that and get an unhandled exception.
4. Since the code finds windows by using the name of each browser window from it's description in the window menu, it can confuse two windows with one-another if they have the same name. If there are two windows which have the current tab set to a file whose title starts the same, this will happen and the same window will be processed twice, and the other window skipped. I'm going to submit this new version now and if I have a chance I'll work on the problem in 1 and follow up. I'd love to hear if anyone actually uses this or has further comments.
Other problems with this script and another revision.
I found a few problems with this, and presumably with all of the versions in the thread so far. I didn't actually read the last submission to see if it addressed any of the same issues.
The first issue below is still open, but as far as I know I've fixed the other issues. 1. If you have 2 tabs in the same window, one of which is the first tab and both have the same url in them, you'll stop collecting url's when you hit the second copy of the first tab. You could lose a whole lot of stuff without noticing it. I haven't yet figured a full fix for this. The right way to do it is to better identify the tab. 2. There's a big problem with PDF files and presumably other file types which may be loaded into Safari. When Safari loads these files it significantly changes the way it structures its list of windows, placing a new window in the list of active windows. The way this code is written it gets an unhandled exception when it tries to extract the url from such a page. 3. Another thing which would confuse this code is if you have a Download window opened. It will try to get a URL from that and get an unhandled exception.
4. Since the code finds windows by using the name of each browser window from it's description in the window menu, it can confuse two windows with one-another if they have the same name. If there are two windows which have the current tab set to a file whose title starts the same, this will happen and the same window will be processed twice, and the other window skipped. I'm going to submit this new version now and if I have a chance I'll work on the problem in 1 and follow up. I'd love to hear if anyone actually uses this or has further comments.
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|