Hi,
I am trying to open an IE window (ie: not in my PB program, but a seperate one) and then Navigate to a URL and pass a referrer as well. I know this is possible (i've got some Delphi code for it) using the IE Object but i can't figure out how to do this from PB (i am VERY new).
Thanks in advance for the help,
Regards,
Tim
InternetExplorer Object, using from PB
If you want to open the Browser:
CS2001
Code: Select all
ShellExecute_(0, "open", "http://www.yoursite.com", 0, 0, 1)
Yeah, that much i had working 
Problem is that i need to "Navigate" (an API call?) from PB to a website so i can pass referrer info to that site as well..
Thanks for the help
Tim

Problem is that i need to "Navigate" (an API call?) from PB to a website so i can pass referrer info to that site as well..
Thanks for the help

Tim
Last edited by TimmyTom on Mon Aug 18, 2003 11:23 am, edited 1 time in total.
try this snippet here viewtopic.php?p=25991&highlight=google#25991 .
it redirects to google with the Purebasic-buildin browser
it redirects to google with the Purebasic-buildin browser
SPAMINATOR NR.1
VERY NICE! I may have a use for that at some point.
However, it doesn't solve my problem. I'll try to be more clear
I want to open a browser window, so, not in a PB gadget/window
I want to use the shdocvw.dll Navigate method (or similar) to tell that browser window to go to a certain url while also sending along a header.
I've tried just about everything i can think of by now but i can't seem to get this done using PB, i can open a browser with shellexecute but that's where i stall
Thanks,
Tim.
However, it doesn't solve my problem. I'll try to be more clear

I want to open a browser window, so, not in a PB gadget/window
I want to use the shdocvw.dll Navigate method (or similar) to tell that browser window to go to a certain url while also sending along a header.
I've tried just about everything i can think of by now but i can't seem to get this done using PB, i can open a browser with shellexecute but that's where i stall

Thanks,
Tim.
A quick look around didn't turn up any specific docs on shdocvw.dll but it was a *very* quick look.. You might be able to open that DLL and call the functions/procedures yourself.. I don't know anything about that library so I can't tell you what to call but it's another route for you to look into!
Good luck!
Good luck!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
ShellExecute
IF you use ShellExecute, you are in effect asking the system to create a chile process with a command prompt, then calling for a program to be
runned in that prompt, then having to pass parameters on the so-called
"Command Line" that the called program is suppose to act upon. This
should work if the called program is capable ot accepting command line
parameters and acting on thiem.
The problem you are experiencing with IE is that, as far as I know, it does
not respond to command line parameters. It does react to a profile for
such things as current window size and location, home URL, favorites, and
some other stored settings. IE can also be enab led to run ActiveX and Java code from within the browser, but again, this is not an area that I am experienced in.
I believe that if you have a desire to use IE in a new and unfamiliar way, you are going to have to focus on the mechanisms within IE that can be manipulated in the manner you describe. I don't think that PB or any other language will have the type of details you are looking for, unless you check out some of the Example code where someone has done some of the effort to bridge the gap for you. I refer specifically to the WebBrowser.pb code in the Source subdirectory, the WebGadge.pb (I think I found that on rhe Resource site), and the SENDKEYS.pb program, which shows how to send messages to another window.
There are also a couple of CLIENT programs which might prove useful. although I have not been able to compile them to judge what they actually do - either a needed file is in the wrong place or not included. In fact there are so many useful programs and snippits involfe (something like over 580)m that it is taking me a good while to weed through them all.
runned in that prompt, then having to pass parameters on the so-called
"Command Line" that the called program is suppose to act upon. This
should work if the called program is capable ot accepting command line
parameters and acting on thiem.
The problem you are experiencing with IE is that, as far as I know, it does
not respond to command line parameters. It does react to a profile for
such things as current window size and location, home URL, favorites, and
some other stored settings. IE can also be enab led to run ActiveX and Java code from within the browser, but again, this is not an area that I am experienced in.
I believe that if you have a desire to use IE in a new and unfamiliar way, you are going to have to focus on the mechanisms within IE that can be manipulated in the manner you describe. I don't think that PB or any other language will have the type of details you are looking for, unless you check out some of the Example code where someone has done some of the effort to bridge the gap for you. I refer specifically to the WebBrowser.pb code in the Source subdirectory, the WebGadge.pb (I think I found that on rhe Resource site), and the SENDKEYS.pb program, which shows how to send messages to another window.
There are also a couple of CLIENT programs which might prove useful. although I have not been able to compile them to judge what they actually do - either a needed file is in the wrong place or not included. In fact there are so many useful programs and snippits involfe (something like over 580)m that it is taking me a good while to weed through them all.
has-been wanna-be (You may not agree with what I say, but it will make you think).
Actually, shdocvw.dll gives standard function and methods for this stuff which are easily callable from Delphi (which i don't own).
In Delphi:
Twebbrowser.Create -> Creates IE window
Twebbrowser.Navigate -> calls the shdocvw.dll "Navigate" method and passes it to the opened IE window (ie: set URL, set headers, flags, etc)
I am guessing that what i want is possible with the CallCOM() function but i have NO idea how that works (even after reading every post on the forums about it).. anyone?
Tim
In Delphi:
Twebbrowser.Create -> Creates IE window
Twebbrowser.Navigate -> calls the shdocvw.dll "Navigate" method and passes it to the opened IE window (ie: set URL, set headers, flags, etc)
I am guessing that what i want is possible with the CallCOM() function but i have NO idea how that works (even after reading every post on the forums about it).. anyone?

Tim