|
magician62
|
 |
« on: February 27, 2012, 12:26:23 PM » |
|
Again another thing I seem to keep doing repetitively, which might find advantage in reduced steps.
Provide a window where a save destination can be defined Window should have options for always on top or normal
Allow the user to past or preferably drag drop from a URL link and save the target for the link in 'Full HTML' format (Webpage complete - The one with the folder) or 'MHT' Include auto rename to increment duplicate filenames.
Existing process Right Click Save target as Select destination, which dependant on which window you come from may not provide the last used destination. Change Filename if required Though this does not provide Full HTML
To get Full HTML Open link File Save as Select Destination Select Full HTML Save
New process left click drag link to application window
It may only seem a small saving but after hundreds of links it can make a big difference
Does something already do this , and I have yet to find it?
|
|
|
|
« Last Edit: February 27, 2012, 12:58:51 PM by magician62 »
|
Logged
|
|
|
|
|
c.gingerich
|
 |
« Reply #1 on: April 18, 2012, 12:24:52 PM » |
|
Looking into this, I can make most of what you ask, but I can only display a Save-As dialog and you would have to choose the location, and press Save. The name of the webpage is set as the file name, but you can change it if needed.
|
|
|
|
« Last Edit: April 18, 2012, 12:35:08 PM by c.gingerich »
|
Logged
|
|
|
|
|
magician62
|
 |
« Reply #2 on: April 26, 2012, 02:34:21 PM » |
|
Sorry for not seeing this before, not been online much over the last few weeks. I am proof life can exist without computers !  A question on the second use of the utility, would it default to the previously used save location? If so it could work. One of the issue I have found when opening multiple internet explorers is that sometimes you get offered different default locations depending on which session or child from a session is uin use Could the default location be defined in a config file ? Would that then allow for auto save? Does the filename auto increment if a duplicate is found?
|
|
|
|
|
Logged
|
|
|
|
|
|
shmuel1
|
 |
« Reply #3 on: May 21, 2012, 11:54:06 AM » |
|
I could make you a script that would do all those steps automatically using AutoIt. What browser do you use and what version?
|
|
|
|
|
Logged
|
|
|
|
|
magician62
|
 |
« Reply #4 on: May 24, 2012, 06:08:09 PM » |
|
I tend to run IE9 with the latest up/downgrades
|
|
|
|
|
Logged
|
|
|
|
|
shmuel1
|
 |
« Reply #5 on: May 28, 2012, 10:37:31 AM » |
|
I made the attached program using AutoIt. I attached the EXE and the source code file (AU3) inside the zip file. If you install AutoIt, you can run the program by double-clicking the AU3 file. (The advantage of doing it this way is that you can edit it yourself.)
To use this program, double-click the EXE. It runs in the background. When you want to save a webpage, first copy a URL then press the shortcut key: CTRL+WindowsKey+S Select the output format and click OK. (The default format is Webpage Complete.) Webpages are saved to a folder on your desktop.
In Internet Explorer 9, you can copy a URL by right-clicking a link, then selecting "Copy shortcut." So if you use Internet Explorer, you would first right-click a link, select "Copy shortcut," then press CTRL+WindowsKey+S.
If you want a different shortcut key or other changes, let me know. One option is to have a separate shortcut key for each output format, Webpage Complete and MHT.
I didn't add the feature of automatically changing the file name if there are duplicates. First try it as is and let me know if you like it.
You can put the program in your Windows Startup folder and it will run when Windows starts up.
|
|
|
|
Logged
|
|
|
|
|
magician62
|
 |
« Reply #6 on: May 30, 2012, 12:14:23 PM » |
|
Have AutoIt installed now  Not sure if its a bug, but "\Saved Webpages\" does not get created. I also tried putting the full path in, but to no avail Could it be because I am using Win7-64 ? Could it be because I use IE9-x64 and IE9-x86 Could it be I am missing something ? 
|
|
|
|
|
Logged
|
|
|
|
|
shmuel1
|
 |
« Reply #7 on: May 31, 2012, 02:55:37 AM » |
|
I have the same system as you, Win7-64. On Win7-64 you have to do the following: - Right-click AutoIt3.exe (located at C:\Program Files (x86)\AutoIt3\AutoIt3.exe) and select Properties. - Click the Compatibility tab. - Click the checkbox next to Run this program in compatibility mode for, then select Windows XP (Service Pack 3). Try it again and let me know if it works.
|
|
|
|
« Last Edit: May 31, 2012, 03:38:48 AM by shmuel1 »
|
Logged
|
|
|
|
|
magician62
|
 |
« Reply #8 on: June 01, 2012, 02:24:20 AM » |
|
Nothing obvious:(
What I am seeing is a window position shift on Ctrl+Win+S similar to what you get when dragging the URL icon to desktop,
No save folder is being created, and when manually created still nothing appears to be saved
|
|
|
|
|
Logged
|
|
|
|
|
magician62
|
 |
« Reply #9 on: June 01, 2012, 02:50:08 AM » |
|
OK figured it. The key combination was already in use! Now if only there was a utility to say what combinations were in use already....Google...ActiveHotkeys.... Donationcoder....  The installer didn't work, but the portable version definitely did  I have only run a handfull of tests, but will take a further look this evening. Of the links I tried to save 50% were pages unable to be saved, but I got the 50% that could  The one improvement I can see so far would be auto closing the new tab after save
|
|
|
|
|
Logged
|
|
|
|
|
shmuel1
|
 |
« Reply #10 on: June 03, 2012, 05:56:51 AM » |
|
I added lines 62 to 66 to close the tab after saving it. See the attached. Remember to edit the hotkey (in line 7) to something that is not in use.
|
|
|
|
Logged
|
|
|
|
|
|
|
magician62
|
 |
« Reply #12 on: June 10, 2012, 12:09:45 PM » |
|
Finally had a chance to have a good play !:) A question, what would I need to change to force HTML every time ( as it seems to be the option I am always using), and bypass the pop up dialogue?
I tried setting
$answer = 1
at line 30, but every time it sets the default name as tabs.htm
|
|
|
|
|
Logged
|
|
|
|
|
shmuel1
|
 |
« Reply #13 on: June 11, 2012, 11:14:56 AM » |
|
When you get tabs.htm as the file name, it means it's saving the page before it finished loading the desired webpage. I had that also, so I added some sleep time before saving the page. Since you are avoiding the dialog box, you need even more sleep time to let the page load before saving it.
Try adding Sleep(3000) before Line 46 Send("^s"). Adjust the sleep value to the amount of time that you need to load an average page.
|
|
|
|
|
Logged
|
|
|
|
|
magician62
|
 |
« Reply #14 on: June 11, 2012, 01:48:06 PM » |
|
That solved it  Now i can put it to a real test, and maybe discover why some pages will not save and others will
|
|
|
|
|
Logged
|
|
|
|
|
|
|
magician62
|
 |
« Reply #16 on: June 12, 2012, 01:51:31 PM » |
|
Your probably right on the active scripting. Maybe it can be disabled at the beginning of the current script and re-enabled at the end. I suggest that method as I assume it may be left permanently disabled once run?
PDF doesn't really suit for the end result. Part of the concept was that in some of my use cases there is image content on webpages I want to save for future reference, and by saving in full HTML the required images from the destination page can be easily extracted from the created folder of files.
Have used the util for a couple of hours today, and it seems to work quite well, filename clashes seem to depend on which website I am using, so if it is possible to add an automatic rename option when it finds a clash, that would be superb.
|
|
|
|
|
Logged
|
|
|
|
|
shmuel1
|
 |
« Reply #17 on: June 14, 2012, 02:34:03 AM » |
|
OK, I have to work on those 2 items.
|
|
|
|
|
Logged
|
|
|
|
|
shmuel1
|
 |
« Reply #18 on: June 18, 2012, 05:31:23 AM » |
|
I added these lines to disable active scripting for the current windows user and enable it afterwards: Formatted for AutoIt with the GeSHI Syntax Highlighter [ copy or print] RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1", "1400", "REG_DWORD", "3") ; disables active scripting in the "Internet Zone" RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1", "1400", "REG_DWORD", "0") ; enables active scripting in the "Internet Zone"
I tested it on my computer and it did change the registry setting. Test it with some webpages that you couldn't save before and see if you can save them now. I also added $answer = 1 to make it save complete webpages without asking you for the format, and I added sleep(3000) before saving the webpage to allow the page to load. If you use the attached (instead of editing your version), remember to edit the Hotkey. In case you are interested, here's the page I used that explains how to disable active scripting via the registry. http://www.cs.kuleuven.be...ows/active-scripting.html
|
|
|
« Last Edit: June 18, 2012, 08:16:24 AM by shmuel1 »
|
Logged
|
|
|
|
|
magician62
|
 |
« Reply #19 on: June 22, 2012, 04:05:08 PM » |
|
Just downloaded the update, will give a thorough test over the weekend 
|
|
|
|
|
Logged
|
|
|
|
|
shmuel1
|
 |
« Reply #20 on: June 26, 2012, 07:25:56 AM » |
|
Here's a new version. In this version I added the time at the end of the filename (in the format HH-MM-SS) to avoid duplicate filenames. If you want me to add the date also, that would be pretty easy.
|
|
|
|
Logged
|
|
|
|
|
|
|
shmuel1
|
 |
« Reply #22 on: July 08, 2012, 05:31:51 AM » |
|
It apparently has something to do with the filename when saving the webpage. It happens with or without the macro. I removed part of the filename and it saved OK. I would say the filename was too long but it's within the Windows filename length limit and there are other names that I successfully saved that are longer. So I'm a bit stumped by what's wrong with the filename. I edited the utility to allow you to edit the filename when there is an error saving. Try the attached version with the page that didn't work: http://www.ebay.co.uk/itm...s&hash=item19d12725a9
|
|
|
« Last Edit: July 08, 2012, 10:15:26 AM by shmuel1 »
|
Logged
|
|
|
|
|