 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
YIessa Guest
|
Posted: Mon Sep 14, 2009 3:05 pm Post subject: |
|
|
| Code: | #NoEnv
#SingleInstance force
SendMode Input
SetBatchLines, -1
DetectHiddenWindows, On
IE_Init()
Gui, +Resize +LastFound
Gui, Show, w800 h600 Center, Test
hGui:= WinExist()
pwb := IE_Add(hGui, 10, 10, 780, 580)
pipa := COM_QueryInterface(pwb, IOleInPlaceActiveObject_Interface)
OnMessage(WM_KEYUP:=0x0101, "WM_KEYDOWN")
OnMessage(WM_KEYDOWN:=0x0100, "WM_KEYDOWN")
IE_LoadURL(pwb, "http://www.google.com/")
return
GuiClose:
Gui, Destroy
COM_Release(pwb)
IE_Term()
ExitApp
return
#include inc\COM.ahk
#include inc\IE.ahk
WM_KEYDOWN(wParam, lParam, nMsg, hWnd)
{
; If (wParam = 0x08 || wParam = 0x09 || wParam = 0x0D || wParam = 0x26 || wParam = 0x28 || wParam = 0x2E || wParam = 0x43 || wParam = 0x56 || wParam = 0x58)
WinGetClass, Class, ahk_id %hWnd%
If (Class = "Internet Explorer_Server")
{
Global pipa
VarSetCapacity(Msg, 28), NumPut(hWnd,Msg), NumPut(nMsg,Msg,4), NumPut(wParam,Msg,8), NumPut(lParam,Msg,12), NumPut(A_EventInfo,Msg,16), NumPut(A_GuiX,Msg,20), NumPut(A_GuiY,Msg,24)
If DllCall(NumGet(NumGet(1*pipa)+20), "Uint", pipa, "Uint", &Msg)=0
Return 0
}
} |
|
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 2462
|
Posted: Tue Sep 15, 2009 6:48 am Post subject: |
|
|
| It's missing the assignment of IOleInPlaceActiveObject_Interface. |
|
| Back to top |
|
 |
YIessa Guest
|
Posted: Tue Sep 15, 2009 10:56 am Post subject: |
|
|
I have found this in the forum "IE and Gui Browser Com Tutorial" :
| Code: | | IOleInPlaceActiveObject_Interface:="{00000117-0000-0000-C000-000000000046}" |
and it works.
Thanks a lot !! |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Tue Sep 15, 2009 12:11 pm Post subject: |
|
|
funny that i didnt spot that rightoff
perhapsif i put this crack pipe down _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
YIessa Guest
|
Posted: Tue Sep 15, 2009 12:35 pm Post subject: Thanks |
|
|
| Thanks a lot tank and Sean for your help and great job |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Tue Sep 15, 2009 1:10 pm Post subject: Re: Thanks |
|
|
| YIessa wrote: | | Thanks a lot tank and Sean for your help and great job | thank sean without him none of this is even possible _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
AHK User Guest
|
|
| Back to top |
|
 |
מא&am Guest
|
Posted: Mon Jul 26, 2010 12:43 pm Post subject: |
|
|
| Sean wrote: | | 1 means that the message was not processed, i.e., ignored by the webpage. What happens if using iexplore.exe? Which version of IE are you using? |
|
|
| Back to top |
|
 |
sp
Joined: 07 May 2011 Posts: 52
|
Posted: Thu May 19, 2011 5:22 pm Post subject: how to embed Internet Explorer and insert some HTML in it. |
|
|
Hello.
How can I do the following in AutoHotKey_L ?
| Code: | #include IEControl.ahk
Gui, +lastfound
Gui1_Hwnd := WinExist() , html_string := "<body bgcolor=88888><center> <font size=5>HTML
<font color=FF0000 ><u>live</u></font><i> preview!!</i>
</font></center><br>`n"
Gui, Add, Edit, w700 h150 vhtml_string gSub_html_string, %html_string%
Gui_IEAdd(Gui1_Hwnd, 10, 160, 700, 325, "about:" . html_string)
Gui, Show, h500, HTML Live...
Return
Sub_html_string:
GuiControlGet, html_string
Gui_IELoadURL( "about:" . html_string)
Return
Guiescape:
Guiclose:
ExitApp |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|