Mike, Javier

Thanks for your help, it was much appreciated. With your help I was able to
provide my client with a good solution to their needs !

Who would have figured that the command had to be all UPPER CASE ? Mike
Byerly that's who ! That was quite a reach, way to go !

Is there a way to create the JPG file without having to visual the variable
Web Browser in a form ?

That would be cool !

Bill Eyring

 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mike Byerley
Sent: Saturday, February 18, 2012 11: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

--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: 
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, 
place any 
text to search for.
================================================


Reply via email to