Page 1 of 1
WEBGADGET LINK GRABBING
Posted: Thu Jan 14, 2010 6:34 pm
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
Re: WEBGADGET LINK GRABBING
Posted: Thu Jan 14, 2010 6:38 pm
by srod
Have a look at the "Demo_PreventPopUpsInWebGadget.pb" demo program which comes with COMatePLUS.
Re: WEBGADGET LINK GRABBING
Posted: Thu Jan 14, 2010 7:02 pm
by freak
> WEBGADGET LINK GRABBING
Your capslock key is broken.
Re: WEBGADGET LINK GRABBING
Posted: Fri Jan 15, 2010 7:00 pm
by utopiomania
srod, can you post a snippet, or is it necessary to install your software to prevent links from opening
in another window?
Re: WEBGADGET LINK GRABBING
Posted: Fri Jan 15, 2010 8:44 pm
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.
Re: WEBGADGET LINK GRABBING
Posted: Sun Jan 17, 2010 6:45 pm
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.
Re: WEBGADGET LINK GRABBING
Posted: Sun Jan 17, 2010 9:47 pm
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.
Re: WEBGADGET LINK GRABBING
Posted: Wed Jan 20, 2010 8:57 pm
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?
Re: WEBGADGET LINK GRABBING
Posted: Wed Jan 20, 2010 9:50 pm
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!

Re: WEBGADGET LINK GRABBING
Posted: Wed Jan 20, 2010 10:25 pm
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.