| View previous topic :: View next topic |
| Author |
Message |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Sun Aug 26, 2007 8:42 am Post subject: Get IE window and change the url. [Delphi] |
|
|
I want to get a already made IE window, and change the url.
| Code: |
function GetWindow (h : HWnd) : Boolean; export; stdcall;
var
Cap : array [0..255] of char;
begin
GetWindowText (Wnd, sCap, sizeof(sCap));
if pos ('google', sCap) > 0 then
begin
//change the url ??
end;
|
I can close the IE window and such with that code, but i dont know how to change the url so it loads diffrent sites.
|
|
| Back to top |
|
 |
assaf84 Expert Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 238
|
Posted: Sun Aug 26, 2007 8:56 am Post subject: |
|
|
If you have GetWindowText(), so you probably have.....?
(hint: SetWindowText() )
But if you want to actually change the URL, I think there is a guide for this in torry's delphi pages
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Sun Aug 26, 2007 9:11 am Post subject: |
|
|
| I cant find the guide on Torry's. I looked all Internet guides through (not reading all lol) and i used the search button.
|
|
| Back to top |
|
 |
DeltaFlyer Grandmaster Cheater
Reputation: 0
Joined: 22 Jul 2006 Posts: 666
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Sun Aug 26, 2007 9:26 am Post subject: |
|
|
| Setting a window text will change the url ? If not then its not what im looking for.
|
|
| Back to top |
|
 |
DeltaFlyer Grandmaster Cheater
Reputation: 0
Joined: 22 Jul 2006 Posts: 666
|
Posted: Sun Aug 26, 2007 9:27 am Post subject: |
|
|
| Kevinnn wrote: | | Setting a window text will change the url ? If not then its not what im looking for. |
You obviously have not read even to the second sentence on that page.
_________________
Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for? |
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sun Aug 26, 2007 9:28 am Post subject: |
|
|
this is why you should do some asm or c++
you dont know how a window works ;]
a textbox, button, memo, any component works as a window
so getwindowtext() can not only get the main form but every component in it.
and if they give you something to read, read it. Then make an educated response?
edit: since you wont read it i will
If the specified window is a control, the text of the control is changed. However, SetWindowText cannot change the text of a control in another application.
of another application. if you can get the handle of IE then you can do it. But you cant get the handle so, j00 ph@il.
_________________
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Sun Aug 26, 2007 9:31 am Post subject: |
|
|
I did read it
| Quote: |
The SetWindowText function changes the text of the specified window's title bar (if it has one). If the specified window is a control, the text of the control is changed. However, SetWindowText cannot change the text of a control in another application.
|
The bold, means that it changes the url? otherwise i dont get it.
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sun Aug 26, 2007 9:32 am Post subject: |
|
|
you are fucking retarded
go make 1 win32 gui in c++.
then you will understand.
_________________
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Sun Aug 26, 2007 9:40 am Post subject: |
|
|
uhm kay, problem is i never made anything in c++.
Someone just explain how i do this? If SetActiveWindow is the way to do it, explain how i am supposed to use it!
|
|
| Back to top |
|
 |
DeltaFlyer Grandmaster Cheater
Reputation: 0
Joined: 22 Jul 2006 Posts: 666
|
Posted: Sun Aug 26, 2007 9:46 am Post subject: |
|
|
| Kevinnn wrote: | I did read it
| Quote: |
The SetWindowText function changes the text of the specified window's title bar (if it has one). If the specified window is a control, the text of the control is changed. However, SetWindowText cannot change the text of a control in another application.
|
The bold, means that it changes the url? otherwise i dont get it. |
You have serious problems with reading...
| DeltaFlyer wrote: | | You obviously have not read even to the second sentence on that page. |
Note I said second sentence; you bolded the first. Now:
| MSDN wrote: | | The SetWindowText function changes the text of the specified window's title bar (if it has one). If the specified window is a control, the text of the control is changed. However, SetWindowText cannot change the text of a control in another application. |
It tells you that the API can be used to change the text of a control. An Edit box is a control. However, if you were able to read on to the third sentence, you will find out that you can't use this API to change the text of a control in another app. This is the time you scroll to the remarks section of MSDN, as they rarely leave a problem hanging like that.
Now, second line of the remarks section:
| MSDN wrote: | | To set the text of a control in another process, send the WM_SETTEXT message directly instead of calling SetWindowText. |
API programming is extremely easy, as it is very well documented on MSDN. All you have to do it read a few web pages. However, it is evident that even such a straightforward task is too difficult for you to handle.
_________________
Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for? |
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sun Aug 26, 2007 9:46 am Post subject: |
|
|
did you fucking read what i said?
you cant change a control in another application
_________________
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sun Aug 26, 2007 9:47 am Post subject: |
|
|
| blankrider wrote: | | you cant change a control in another application |
yes you can
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sun Aug 26, 2007 9:47 am Post subject: |
|
|
he needs the handle of the IE window
which he cant get?
_________________
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Sun Aug 26, 2007 9:49 am Post subject: |
|
|
| appalsap wrote: | | blankrider wrote: | | you cant change a control in another application |
yes you can |
Lol. With SetWindowText ?
Thanks Delta, you cleared it up a bit.
|
|
| Back to top |
|
 |
|