Color Coding The arguments are color coded to indicate what version supports them. Freeware Edition Personal Edition Server Edition
By default the image width and height are taken from the browser width and height which are determined automatically. On some pages it is difficult to correctly determine the width and height for a page, therefore it is recommended that you specify and minimum browser width and height.
Timing is everything
Just like a camera has a bunch of options to allow you to take the best possible picture, so does WebShot. Some of these configurable options come in the form of wait parameters that specify amounts of time to wait before or after certain browser events occur. Because of the nature of the web these days, a lot of websites have scripts or activex controls that load after a page has been downloaded by Internet Explorer. Flash is a good example of an activex control that takes time to load after the page has completed downloading. Some content heavy flash and active-x controls may take longer to load than others. Therefore the wait parameters allow you to wait a specified amount of time for objects on the pages to load.
webshotcmd.exe /url "http://www.google.com/" /headers "Accept-Language: en||Referer: http://www.google.com/ig"
webshotcmd.exe /url "http://www.google.com/" /postdata "Username=TestUser&Password=TestPass&Submit=OK".
Instead of having to pass the same parameters through the command line each time you run WebShot, you can setup an xml configuration file that contains your most commonly used parameters.
<WebShot> <Debug>FALSE</Debug> <ImagePath>\images\</ImagePath> <BrowserWidth>1024</BrowserWidth> <BrowserHeight>768</BrowserHeight> <BatchFile>urls.txt</BatchFile> <Verbose>TRUE</Verbose> </WebShot>
The xml configuration file should be in the same directory as webshotcmd.exe and should be named webshotcmd.xml.
Url, Image FileName, Error Message, Browser Width, Browser Height, Image Width, Image Height, Timestamp, Page Title, Meta Keywords, Meta Description Click here to see an example csv file.
Click here to see an example csv file.
All column values have double quotes around them. The error message field may have more than one error message. Each csv entry is separated by a return break sequence \r\n. As a final check to see wheither the screenshot was successful, check to make sure that the image file exists.
<WebShotAutomation> <MessageBox> <Text>Stack overflow at line: 0</Text> <Caption>Windows Internet Explorer</Caption> <Result>Ok</Result> </MessageBox> </WebShotAutomation>
WebShot comes with an automation configuration file that contains some of the common message boxes that I've encountered. If you encounter any new ones, feel free to email me you config file.
The final output path should not exceed more than 256 characters. The following characters are stripped from the resultant output filename "? \ / : & = %".
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Control\Session Manager\SubSystems Key: Windows Value: %SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,3072,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=24 http://support.microsoft.com/kb/126962
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\ Windows\CurrentVersion\Internet Settings\ (DWORD) "Security_HKLM_only" = 1 http://support.microsoft.com/kb/182569
int32 WebShotHandle; WebShot_DllInit("webshot.log", DEBUG_FLAGWINDOW | DEBUG_FLAGFILE); WebShot_Create(&WebShotHandle); WebShot_SetVerbose(WebShotHandle, TRUE); if (WebShot_Open(WebShotHandle, "http://www.websitescreenshots.com/") == FALSE) printf("Error: Cannot take screenshot!\n"); WebShot_Destroy(&WebShotHandle); WebShot_DllUninit();
Google Preview | GoYellow.de | ThumbnailsPro | FreeFAV | The Hype Machine | WebShotsPro | Tjoos | CbAnalytics