Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

IE_Add() or COM_AtlAxCreateContainer() or AtlAxWin()


  • Please log in to reply
2 replies to this topic
Leroy
  • Guests
  • Last active:
  • Joined: --
I am pretty stuck with this one. I finally figured out how too position the explorer.window.

But when I do set a position it wont auto resize the explorer.window on resizeing the gui.


This is a gui with a browser no position or size defined it resize's with the gui. Just like I want it but it is not at the right position ?

SetWorkingDir, %A_ScriptDir%   
#include %A_ScriptDir%\com.ahk
#include %A_ScriptDir%\ie.ahk

Gui +LastFound +Resize +MinSize600x300	 
Gui, Show, center h600 w600, Test
COM_AtlAxWinInit()

;msgbox % winexist() ;%



 pweb := COM_AtlAxCreateControl(WinExist(), "Shell.Explorer")

;pweb := COM_AtlAxGetControl(COM_AtlAxCreateContainer(WinExist(),top,left,width,height, "Shell.Explorer") ) 
;pweb := COM_AtlAxGetControl(COM_AtlAxCreateContainer(WinExist(),25,203,550,372, "Shell.Explorer") ) 

;pweb := IE_Add(hWnd, x, y, w, h)

;pweb := IE_Add(WinExist(), 25, 203, 550, 372)

 psink:=   COM_ConnectObject(pweb, "Web_")
 
COM_Invoke(pweb, "Silent", True)
COM_Invoke(pweb, "Navigate2", "http://www.google.com/")

Return

GuiClose:
COM_Release(psink)
COM_Release(pweb)
Gui, Destroy
COM_AtlAxWinTerm()
ExitApp



This is a gui with a browser WITH position or size defined it doesn't resize's with the gui. But now its at the position I want it.

SetWorkingDir, %A_ScriptDir%   
#include %A_ScriptDir%\com.ahk
#include %A_ScriptDir%\ie.ahk

Gui +LastFound +Resize +MinSize600x300	 
Gui, Show, center h600 w600, Test
COM_AtlAxWinInit()

;msgbox % winexist() ;%



;pweb := COM_AtlAxCreateControl(WinExist(), "Shell.Explorer")

;pweb := COM_AtlAxGetControl(COM_AtlAxCreateContainer(WinExist(),top,left,width,height, "Shell.Explorer") ) 
;pweb := COM_AtlAxGetControl(COM_AtlAxCreateContainer(WinExist(),25,203,550,372, "Shell.Explorer") ) 

;pweb := IE_Add(hWnd, x, y, w, h)

 pweb := IE_Add(WinExist(), 25, 203, 550, 372)

 psink:=   COM_ConnectObject(pweb, "Web_")
 
COM_Invoke(pweb, "Silent", True)
COM_Invoke(pweb, "Navigate2", "http://www.google.com/")

Return

GuiClose:
COM_Release(psink)
COM_Release(pweb)
Gui, Destroy
COM_AtlAxWinTerm()
ExitApp


Please give me hint on solving this.

:cry:

Thank you very much.

tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: May 02 2019 09:16 PM
  • Joined: 21 Dec 2007
SetWorkingDir, %A_ScriptDir%   
#include %A_ScriptDir%\com.ahk
;~ #include %A_ScriptDir%\ie.ahk

Gui +LastFound +Resize +MinSize600x300   
Gui, Show, center h600 w600, Test
COM_AtlAxWinInit()

 pweb := COM_AtlAxGetControl(COM_AtlAxCreateContainer(WinExist(),25, 203, 550, 372, "Shell.Explorer") )

 
COM_Invoke(pweb, "Silent", True)
COM_Invoke(pweb, "Navigate2", "http://www.google.com/")

Return

GuiSize:
WinMove, % "ahk_id " . COM_AtlAxGetContainer(pweb), , 25, 203, A_GuiWidth - 50, A_GuiHeight - 228
Return
GuiClose:
COM_Release(psink)
COM_Release(pweb)
Gui, Destroy
COM_AtlAxWinTerm()
ExitApp
IE and Gui Browser Com Tutorial
<!-- m -->http://www.autohotke... ... highlight=<!-- m -->
Never lose.
WIN or LEARN.

Leroy
  • Guests
  • Last active:
  • Joined: --
:oops:

Thank you very much.

Wow it works :cry: so beautifull.

:wink: