How to export revBrowserSnapshot to file?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

openworld
Posts: 63
Joined: Sat Sep 11, 2010 3:56 am
Location: Virginia, USA
Contact:

Re: How to export revBrowserSnapshot to file?

Post by openworld » Sat Oct 23, 2010 7:07 pm

Bernd,

After trying with Safari and then Firefox, and pressing the buttons in sequence (waiting for five seconds between each click), I'm still finding the same result - two gray rectangles! It does show "1" as the number of initialized browsers active.

Would a field to catch the script execution process help in seeing why the initialized browser isn't able to send info to the "Browser Rect Graphic" object?

Best,

Mark

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4036
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: How to export revBrowserSnapshot to file?

Post by bn » Sat Oct 23, 2010 7:26 pm

Mark,

this is strange. Apparently the revbrowser is initialized. But it does not show at the rect of the placeholder graphic.

Did you quit Livecode in between trials? Just to be shure.

Once you have the browserId in the field, could you make a button with this script

Code: Select all

global gBrowserID
on mouseUp
   put revBrowserGet(gBrowserId, "rect")
end mouseUp
it should put the rect into the message box. Look if it says 0,0,0,0 or 50,30,526,360 which is the rect of the placeholder graphic.


There is nothing really that I can think off to debug this further since it is an external. My only hope is that someone could try this on his Mac to see whether it works or not, to exclude some peculiarities with your setUp.
Maybe you have another Mac or another account on your Mac to try this. Do you have ad-ons for Safari? If so try to turn them off in the Safari preferences.


still thinking
regards
Bernd

openworld
Posts: 63
Joined: Sat Sep 11, 2010 3:56 am
Location: Virginia, USA
Contact:

Re: How to export revBrowserSnapshot to file?

Post by openworld » Sat Oct 23, 2010 7:47 pm

Bernd,

When I made the button as you described to export tData ("put tData into msg"), I did get the following location data for the rectangle:

50,30,526,360

I'll retry after disabling Safari extensions and post an update in a few minutes...

Best,

Mark

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4036
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: How to export revBrowserSnapshot to file?

Post by bn » Sat Oct 23, 2010 7:54 pm

Mark,

I dont understand:
When I made the button as you described to export tData ("put tData into msg"), I did get the following location data for the rectangle:
did you make a button with just the code from above? There was no variable tData in it.
Or please post the script of the button you made. If you picked up the rect of the placeholder graphic then it would return the same value.

regards
Bernd

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4036
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: How to export revBrowserSnapshot to file?

Post by bn » Sat Oct 23, 2010 8:17 pm

Mark,

I asked Dixie for help and he tested it on his Mac 10.6.4. and it worked for him. It seems more and more to be a problem with your setup.

He even sent me a screenshot.

Maybe the idea to test it from another account on your Mac is not that bad.



I see you know Richard Gaskins. He is really fantastic, very helpful and knowledgeable.


regards
Bernd
Attachments
Screen shot 2010-10-23 at 20.07.37.zip
(232.17 KiB) Downloaded 198 times

openworld
Posts: 63
Joined: Sat Sep 11, 2010 3:56 am
Location: Virginia, USA
Contact:

Re: How to export revBrowserSnapshot to file?

Post by openworld » Sat Oct 23, 2010 8:21 pm

Bernd,

The script I put into a new "Export to msg" button is:

global gBrowserID
on mouseUp
put revBrowserGet(gBrowserId, "rect")
end mouseUp

As you recommended, I did not press this new button right away. I awaited for about five seconds to press it after clicking on the first "initialize browser" button.

Each time, with each browser (I quit Livecode each time as well), the "Export to msg" button produces the following in the Message popup:

>>put tData into msg
>>50,30,526,360

Hope this helps...

Best,

Mark

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4036
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: How to export revBrowserSnapshot to file?

Post by bn » Sat Oct 23, 2010 8:26 pm

Mark,

The script is ok and it indicates there is an instance of the revbrowser active at the location where it should be, it is apparently just not visible.
I just read about an obscure bug of the revBrowser when resizing a stack that has an active instance of the revbrowser going. I don't assume that this is the case here.
I could not reproduce the bug when trying and dont really understand the issue. Seems to have to do with the windowID.

Maybe Richard can shed some light on this.

regards
Bernd

openworld
Posts: 63
Joined: Sat Sep 11, 2010 3:56 am
Location: Virginia, USA
Contact:

Re: How to export revBrowserSnapshot to file?

Post by openworld » Sat Oct 23, 2010 8:31 pm

Bernd,

Is there any way to check whether I am in fact calling the revBrowser external?

I earlier downloaded the revBrowser demo stack for runRev (not Livecode). I believe it dated back to May or June.

I made sure this earlier demo stack was not running when I tried your stack.

Is there a way to check whether/if I have a working revBrowser external? When I search my Mac I do find a revBrowser.dll file - is the Mac OS able to use it?

Best,

Mark

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4036
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: How to export revBrowserSnapshot to file?

Post by bn » Sat Oct 23, 2010 8:45 pm

Mark,

the browser on a mac is in the app folder. If you control-click on the icon of the livecode 4.5 app in the application folder it offers you to view the content.
You will see something like this:
Bildschirmfoto 2010-10-23 um 21.34.48.png
Bildschirmfoto 2010-10-23 um 21.34.48.png (47.3 KiB) Viewed 8368 times
it is the revbrowser.bundle
so you dont have to worry about that, I think.

This still begs the question, why it is not working for you.

regards

Bernd

openworld
Posts: 63
Joined: Sat Sep 11, 2010 3:56 am
Location: Virginia, USA
Contact:

Re: How to export revBrowserSnapshot to file?

Post by openworld » Sat Oct 23, 2010 9:04 pm

Bernd,

Many thanks!!!!

For some reason, only my original Eval version of LiveCode studio is in my application folder!

The new Livecode app that I purchased (the basic Win/Mac personal use version) is not visible when I open my App folder.

Strangely, my LiveCode 4.5 app does appear in the App folder when I do a Spotlight search!

And even more strangely, the RevBrowser.bundle does not show up anywhere when I search....

I'll try using disk utilities tonight to fix the preferences... any other thoughts in the meantime?

Best,

Mark

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4036
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: How to export revBrowserSnapshot to file?

Post by bn » Sat Oct 23, 2010 9:12 pm

Mark,
And even more strangely, the RevBrowser.bundle does not show up anywhere when I search....
Spotlight is not supposed to find things inside an app.folder.

But maybe you should get rid of the evaluation version, if that is not the real one.

Maybe it is time to do a reinstall of LiveCode after cleaning out the eval version and the 4.5 full version, or at least the eval version and move the 4.5 version to the application folder. If you want to clean out some versions I would do a restart before reinstalling the new Livecode 4.5, just to make shure. It will not hurt to fix the preferences, which I also do from time to time, but I doubt it has to do with your problem.

good luck, keep us posted.

Bernd

openworld
Posts: 63
Joined: Sat Sep 11, 2010 3:56 am
Location: Virginia, USA
Contact:

Re: How to export revBrowserSnapshot to file?

Post by openworld » Wed Oct 27, 2010 6:46 pm

Bernd,

Success!!!

I've installed LiveCode on my other Mac (running OSX 10.4) and the revBrowser demo stack work is working beautifully... it is amazing to see the drag and drop of text working from the browser into the card field.

In order to separate the dropped text fragments, is there a way I can automatically concatenate two carriage returns into the card field script, to be included after each text fragment?

Again, huge thanks --

Best,

Mark
bn wrote:Mark,
could you try this version? Click the sequence of the three buttons, waiting between each click just a couple of seconds.
Clicking the first button initializes the browser and should show a blank white over the area of the placeholder graphic. If that is so the browser is initialized allright.
Then click on the "go openworld" button. wait. for me in under 2 seconds there is the website displayed.
if the site is displayed you might want to try button "find Mark Frazier" it tries to find the name on the site.

Once you get a website you can try a snapshot.

tell me what happens

regards

Bernd

Klaus
Posts: 13878
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How to export revBrowserSnapshot to file?

Post by Klaus » Wed Oct 27, 2010 6:56 pm

bn wrote:Anybody on a Mac who could test above stack?
SnapFromBrowser-3.livecode.zip
Klaus?
regards
Bernd
Hi Bernd,

sorry, just discoverd this today.
Works fine on my Mac!


Best

Klaus

Klaus
Posts: 13878
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How to export revBrowserSnapshot to file?

Post by Klaus » Wed Oct 27, 2010 6:59 pm

openworld wrote:...In order to separate the dropped text fragments, is there a way I can automatically concatenate two carriage returns into the card field script, to be included after each text fragment?
Hi Mark,

you could add this to the field where the user drops the text:

Code: Select all

on dragdrop
  put CR & CR after me
  pass dragdrop
end dragdrop
Tested and works as exspected, but only if the user will drop the new text after the last character in the field. :D


Best

Klaus

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4036
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: How to export revBrowserSnapshot to file?

Post by bn » Wed Oct 27, 2010 7:23 pm

Mark,

glad it worked for you. Still not shure what kept it from working on your other Mac. It is very frustrating if one gets stuck at such an early stage of a project. There are probably many 'legitimate' reasons for not working code ahead, but this was not one.


Klaus, thanks for testing, it was just to make shure, that the stack works to narrow it down to a problem (which?) with Mark's Mac.

regards

Bernd

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”