Skizmata Posted April 21, 2009 Share Posted April 21, 2009 I would like to be able to resize an embedded IE object similar to ctrl+MouseWheelUp or Down. I have a data cgi page written in perl for some work stuff that need to be kept in a small frame always on top. Autoit works great for this but I have got the complaint that it is too small to read so I would like to be able to let them scale up/down the page. Any ideas? AutoIt changed my life. Link to comment Share on other sites More sharing options...
bo8ster Posted April 21, 2009 Share Posted April 21, 2009 Look at WinMove. You will need a handle to the window though but you should be able to tie in something like the MouseWheel into the call. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
Skizmata Posted April 21, 2009 Author Share Posted April 21, 2009 Thanks bo8ster, unfortunately I must have not made myself clear. I do no need to move or resize a window. I need scale the html displayed in an IE Embedded object. Making the window larger or smaller has no effect on the side of the displayed HTML. AutoIt changed my life. Link to comment Share on other sites More sharing options...
Authenticity Posted April 21, 2009 Share Posted April 21, 2009 (edited) expandcollapse popup#include <IE.au3> #include <Misc.au3> #include <WindowsConstants.au3> Const $OLECMDEXECOPT_DODEFAULT = 0 Const $OLECMDID_OPTICAL_ZOOM = 0x3F Const $WM_MOUSEWHEEL = 0x020A Const $MK_CONTROL = 0x0008 Dim $iZoom = 100 Dim $hGUI = GUICreate('Test', 400, 400, 200, 200, $WS_THICKFRAME) Dim $oIE = _IECreateEmbedded() Dim $IEobj = GUICtrlCreateObj($oIE, 0, 0, 400, 400) _IENavigate($oIE, 'http://www.autoitscript.com/') GUIRegisterMsg($WM_SIZE, 'onresize') GUIRegisterMsg($WM_MOUSEWHEEL, 'onmousewheel') GUISetState() Do Until GUIGetMsg() = -3 GUIDelete() Func onresize($hwnd, $iMsg, $iwParam, $ilParam) Local $iWidth = BitAND($ilParam, 0xFFFF) Local $iHeight = BitShift($ilParam, -16) GUICtrlSetPos($IEobj, 0, 0, $iWidth, $iHeight) return 'GUI_RUNDEFMSG' EndFunc Func onmousewheel($hwnd, $iMsg, $iwParam, $ilParam) Local $iDelta = BitAnd($iwParam, 0xFFFF0000)/0x10000 If BitAND($iwParam, 0xFFFF) = $MK_CONTROL Then If $iDelta > 0 Then $iZoom += 20 Else $iZoom -= 20 EndIf If $iZoom < 10 Or $iZoom > 800 Then $iZoom = 100 $oIE.ExecWB($OLECMDID_OPTICAL_ZOOM, $OLECMDEXECOPT_DODEFAULT, $iZoom, 0) EndIf EndFunc Edited April 21, 2009 by Authenticity Link to comment Share on other sites More sharing options...
drego Posted April 8, 2014 Share Posted April 8, 2014 This seems to be what I need but how can I add navigation controls above the browser? Can someone show me please? Link to comment Share on other sites More sharing options...
Bert Posted April 8, 2014 Share Posted April 8, 2014 If you look in the help file there is an example there showing you exactly what you need. Start a new thread if you need help please. A moderator will most likely close this thread due to this is a necropost for this thread is 5 years old. . The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now