 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Sir Daniel Guest
|
Posted: Fri Aug 08, 2008 8:50 pm Post subject: IE_Move |
|
|
I'm trying to make a full-screen browser using the Internet Explorer Control
Internet Explorer Control, but I've run into a problem.
Both "IE_Move(pwb, 20, 0, 1044, 768)" and "Gui, Show, Xn Yn" won't let me make the browser bigger than the screen. I was going to do that to hide the title bar, scroll bar, and an advertisement at the top of a web page from view.
| Code: | #Include IEControl.ahk
#Include CoHelper.ahk
#SingleInstance force
W := A_ScreenWidth+0
H := A_ScreenHeight+0
WinTitle = The Browser
GoSub, GuiStart
Gui, +LastFound +Resize
Gui, Show, , %WinTitle%
WinSet, AlwaysOnTop, On, %WinTitle%
hWnd := WinExist()
CLSID_WebBrowser := "{8856F961-340A-11D0-A96B-00C04FD705A2}"
IID_IWebBrowser2 := "{D30C1661-CDAF-11D0-8A3E-00C04FC9E26E}"
pwb := CreateObject(CLSID_WebBrowser, IID_IWebBrowser2)
AtlAxAttachControl(pwb, hWnd)
IE_LoadURL(pwb, "http://www.autohotkey.com/")
IE_Move(pwb, 20, 0, 1045, 800)
Return
GuiStart:
AtlAxWinInit()
CoInitialize()
Return
GuiClose:
Gui, %A_Gui%:Destroy
Release(pwb)
CoUninitialize()
AtlAxWinTerm()
ExitApp |
|
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6847 Location: Pacific Northwest, US
|
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 1033
|
Posted: Sat Aug 09, 2008 4:01 am Post subject: |
|
|
why not set theatre mode: http://msdn.microsoft.com/en-us/library/aa752077(VS.85).aspx
| Code: | COM_init()
oIE := COM_CreateObject("InternetExplorer.Application")
COM_Invoke(oIE, "Visible=", "True") ;"False" ;"True" ;
COM_Invoke(oIE, "TheaterMode ", "True")
COM_Invoke(oIE, "Navigate", "http://www.google.com")
loop 10{ ;limit to 60 seconds
Sleep, 500
rdy:=COM_Invoke(oIE,"readyState")
If (rdy = 4)
break
}
oDoc := COM_Invoke(oIE,"Document") | or you can do this
| Code: | COM_init()
oIE := COM_CreateObject("InternetExplorer.Application") COM_Invoke(oIE, "top", "-200")
COM_Invoke(oIE, "Width", A_ScreenWidth+0)
COM_Invoke(oIE, "height", A_ScreenHeight+200)
COM_Invoke(oIE, "left", "0")
COM_Invoke(oIE, "Visible=", "True") ;"False" ;"True" ;
COM_Invoke(oIE, "Navigate", "http://www.google.com")
loop 10{ ;limit to 60 seconds
Sleep, 500
rdy:=COM_Invoke(oIE,"readyState")
If (rdy = 4)
break
}
oDoc := COM_Invoke(oIE,"Document")
|
i use the up to date com library rather than cohelper
[ Moderator!: MSDN link fixed ] _________________ Read this
Com
Automate IE7 with Tabs |
|
| 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
|