AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IE_Move

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Sir Daniel
Guest





PostPosted: Fri Aug 08, 2008 8:50 pm    Post subject: IE_Move Reply with quote

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. Cool

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

PostPosted: Fri Aug 08, 2008 9:01 pm    Post subject: Reply with quote

I think the best you can do is:
http://www.autohotkey.com/forum/viewtopic.php?t=24797
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
tank



Joined: 21 Dec 2007
Posts: 1033

PostPosted: Sat Aug 09, 2008 4:01 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group