Mike, I had no thought of that. I very seldom type the PROPERTY commands; I normally cut and paste either from R:Docs or other existing forms. I think that a stored procedure could be created that gets the Component ID for the form and the desired form component and returns the parameters to capture the screen, or actually captures the screen. I have used only the JPG extension, as this is the file type I have always used to display graphics in forms and reports. I would certainly expect the PNG type to be smaller; I will run tests using different file extensions and check the headers to verify type. All in all, the CAPTURE property has been extremely useful for capturing screen images for reports.
Javier, Javier Valencia, PE O: 913-829-0888 H: 913-397-9605 C: 913-915-3137 -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Mike Byerley Sent: Saturday, February 18, 2012 10:49 AM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: Printing Google Maps Javier, The problem he is having (after a couple hours messing with this) has to do with 'CAPTURE_FROM_WINDOW' being case sensitive. If you change a single character to lower case, it won't work. Otherwise it works perfectly no matter what the pathname (so long as the path exists) of the output file is passed. I did notice however, when you passed PNG or BMP or TIF, the filesizes are exactly the same, so I am unsure of the exact filetype as I haven't gone into examining the headers. When you specify JPG, the filesize is much smaller than the aforementioned filetypes. ----- Original Message ----- From: "Javier Valencia" <[email protected]> To: "RBASE-L Mailing List" <[email protected]> Sent: Friday, February 17, 2012 5:56 PM Subject: [RBASE-L] - RE: Printing Google Maps Bill, You have mail…zip file with test database and sample of screen capture file. Please note that the coordinates are those of the display/screen rather than the form, hence it helps to place the form on the upper left hand side of the screen; you can us the following command on the After Start EEP: PROPERTY RBASE_FORM TOP '0' PROPERTY RBASE_FORM LEFT '0' Use a form with no border and place the variable web browser all the way up and left. I requested a modification to use the form, rather than the screen coordinates, but I do not believe there are plans to do this. The advantage of using screen rather than form coordinates is that you can capture screen information outside of the form. After a couple of tries you will figure out the padding needed to capture the desired portion of the screen. You might also want to draw a border around the browser. Let me know if it works for you Javier Valencia, PE O: 913-829-0888 H: 913-397-9605 C: 913-915-3137 From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Friday, February 17, 2012 2:38 PM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: Printing Google Maps Javier, Yes, I am using version 9.1.5.20214. I have still not been able to save to a file. I am using a Variable Web Browser control, that's good right ? I get the map to display in the variable Web Browser but it will not save. Here are the variations in my code. You will see 4 different ones. I comment out 3 to try 1 at a time; set v vfile text='C:\TEST.JPG' property rbase_form Capture_from_window &VFILE --property rbase_form 'Capture_from_window|17,41,661,701' &VFILE --property rbase_form Capture_from_screen &VFILE --property rbase_form 'Capture_from_screen|17,41,661,701' &VFILE The location of my variable web browser field is: Left 17 Top 41 Width 644 Height 661 I add Left and Width to get 661 Right I add Top and Height ti get 701 Bottom Is this right ? Thanks for the help. Bill Eyring -------- Original Message -------- Subject: [RBASE-L] - RE: Printing Google Maps From: "Javier Valencia" < <mailto:[email protected]> [email protected]> Date: Thu, February 16, 2012 8:25 pm To: <mailto:[email protected]> [email protected] (RBASE-L Mailing List) Bill, You are on the latest 9.1 release, right? I use JPG files rather than PNG and works correctly for me. Try using the jpg format and see if it works for you. Also, if you have spaces in your path/file name, you might need quotes around the variable. Try something simple, like test.jpg, on the local directory and go from there, and make sure you have write privileges on the target directory. Javier, Javier Valencia, PE O: 913-829-0888 H: 913-397-9605 C: 913-915-3137 From: <mailto:[email protected]> [email protected] [ <mailto:[email protected]> mailto:[email protected]] On Behalf Of Bill Eyring Sent: Thursday, February 16, 2012 6:40 PM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: Printing Google Maps Javier I'm having a problem actually saving the file using the PROPERTY RBASE_FORM 'CAPTURE_FROM_WINDOW|365,228,915,625' &vImage command. I replaced the size settings with my own but it will not save the file, here is my code; --Start code property vci_WebBrowser GOURL .vtest set v vimage text=null set v vimage=('Y:\GlenCoveNew\Maps\'+.vsektion+.vblock+.vlot+'.png') property rbase_form 'Capture_from_window|377,41,1021,701' &vImage --End Code vtest when launched produces the Google Map the property vci_WebBrowser GOURL .vtest command loads the map into my variable Web Browser The command: property rbase_form 'Capture_from_window|377,41,1021,701' &vImage does not save the file. Am I mis-understanding the property command ? Thanks for the help. Bill Eyring _____ From: <mailto:[email protected]> [email protected] <mailto:[mailto:[email protected]]> [mailto:[email protected]] On Behalf Of Javier Valencia Sent: Wednesday, February 15, 2012 9:46 PM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: Printing Google Maps Bill, Here is an elegant all R:Base solution. To display the Google map in a R:Base form: In your application form define a Web Browser where the Google map will be displayed. Load the URL using the command: PROPERTY vci_WebBrowser GOURL .vYourGoogleURL Now you have the Google map displayed within your form. To capture the Map: Use the new Capture Property as follows SET VAR vImage = 'GoogleMapJPG' PROPERTY RBASE_FORM 'CAPTURE_FROM_WINDOW|365,228,915,625' &vImage Replace “365,228,915,625” (Left,Top,Right,Bottom') with the pixel coordinates of the Web Browser field on the form. Now, you have the Google map captured in the file GoogleMap.jpg and you can use it in a report or just save it for future use. You can automate the entire procedure by placing the proper commands in the After Start EEP. And as R:azzak would say…that‘s all there is to it; or as we developers say…ain’t R:Base great? Javier, Javier Valencia, PE O: 913-829-0888 H: 913-397-9605 C: 913-915-3137 From: <mailto:[email protected]> [email protected] <mailto:[mailto:[email protected]]> [mailto:[email protected]] On Behalf Of <mailto:[email protected]> [email protected] Sent: Wednesday, February 15, 2012 2:23 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Printing Google Maps I have an app that launches a file that goes out to the Internet and launches a Google map that has 6 push-pins locating different properties on the map. I know I can click the Print button and print the map, but I would like to make the process cleaner by either printing this map automatically or saving it to a file for later printing. Does anyone have a script that does something like this ? Thanks, Bill Eyring

