WEBGADGET LINK GRABBING

Just starting out? Need help? Post your questions and find answers here.
Marvi
User
User
Posts: 17
Joined: Fri Oct 03, 2008 6:02 pm
Location: Milano

WEBGADGET LINK GRABBING

Post by Marvi »

I read all posts in forum about this argument, but I didn't find any simple or clear answer to my problem.

In webgaget while I'm browsing within a site, a link opens another web window, unfortunately out of webgadget window: I would like to grab the link address, in order to
kill opening window. Once I get the address, I can dowload it in a hidden way.
Is it possible in a simple way to grab the clicked link address?
Thanks
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: WEBGADGET LINK GRABBING

Post by srod »

Have a look at the "Demo_PreventPopUpsInWebGadget.pb" demo program which comes with COMatePLUS.
I may look like a mule, but I'm not a complete ass.
freak
PureBasic Team
PureBasic Team
Posts: 5941
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: WEBGADGET LINK GRABBING

Post by freak »

> WEBGADGET LINK GRABBING

Your capslock key is broken.
quidquid Latine dictum sit altum videtur
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Re: WEBGADGET LINK GRABBING

Post by utopiomania »

srod, can you post a snippet, or is it necessary to install your software to prevent links from opening
in another window?
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: WEBGADGET LINK GRABBING

Post by srod »

utopiomania wrote:srod, can you post a snippet, or is it necessary to install your software to prevent links from opening
in another window?
If you wish to use my COMate example for intercepting links etc. then you will need to download COMatePLUS. No installation as such, just a simple copy.

The demo intercepts all link clicks which would ordinarily result in a new window being opened and instead redirects them to a single web-gadget etc.
I may look like a mule, but I'm not a complete ass.
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Re: WEBGADGET LINK GRABBING

Post by utopiomania »

Marvi, if this is about popup blocking, you can use this:
#PB_Web_BlockPopups : Block popup windows. #PB_EventType_PopupWindow is fired if this setting is enabled.
with

Code: Select all

SetGadgetAttribute(#Gadget, Attribute, Value)
If it is about ordinary links opening in a separate window, you can use the same procedure with
#PB_Web_NavigationCallback: Set a callback for monitoring (and disabling) navigation.
This hooks into clicked links, so it should be possible to stop the navigation, and reopen the link in the same webbrowser.

I hope I don't misunderstand you.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: WEBGADGET LINK GRABBING

Post by srod »

utopiomania, on my system the navigation callback does not catch links which open new browser windows, which is why I suggested the COMatePLUS example which does exactly that.
I may look like a mule, but I'm not a complete ass.
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Re: WEBGADGET LINK GRABBING

Post by utopiomania »

It doesn't work here either. Srod, I don't use libraries because the team keep breaking the syntax all the time, so. If you had a terminal car chrash, and I based some commercial code on your lib...No way.

So what about posting the basics? I found a solution to my question about the webgadget and the script errors reporting
over at codingmonkeys, but what about this final obstacle?
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: WEBGADGET LINK GRABBING

Post by srod »

COMatePLUS comes in source code form and so PB updates are unlikely to break it. Okay, PB 4.4 RC1 has broken it, but only because of there being a bug with PB. :) Anyhow, the 'basics' are not needed because you have access to the full source.

I also do not use closed user-libs in my projects for the very same reason as yourself (dll's aside as they are pretty much unbreakable). This is why all of my free libs come in their original source code form.

Were I to wrap myself and my poor car around a tree then I am sure someone would happily maintain COMate - if no reason but to honour my memory! :wink:
I may look like a mule, but I'm not a complete ass.
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Re: WEBGADGET LINK GRABBING

Post by utopiomania »

This was about my no.one problem, and I am sorry that the link grabbing question can't be solved in a similar way using PureBasic alone.

Thanks for your time.
Post Reply