Jump to content

Create a browser window and maximize it


Recommended Posts

#include <IE.au3>

_IECreate("www.google.com")
Sleep(5000)
WinSetState("Google - Internet Explorer","",@SW_MAXIMIZE)

The browser window opens and it goes to google.com but it will not maximize. I have also tried:

#include <IE.au3>

Local $Browser = _IECreate("www.google.com")
Sleep(5000)
WinSetState($Browser,"",@SW_MAXIMIZE)

Also doesn't work. I'm running windows 8.1 x64 and internet explorer 11.0.9600.16384. Help!

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Link to comment
Share on other sites

Use the window title like this "Google - Windows Internet Explorer" 

 

Edit - I don't think you need the sleep function.

Local $Ie = _IECreate("www.google.com",0,1,1,1)
;Sleep(2000)
WinSetState("Google - Windows Internet Explorer","",@SW_MAXIMIZE)

 

Edited by kcvinu
Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

You can get the window handle by using _IEPropertyGet ($oIE, "hwnd") :

#Include <IE.au3>

$oIE = _IECreate("https://www.autoitscript.com/forum")

$hwndIE = _IEPropertyGet ($oIE, "hwnd")
WinSetState($hwndIE, "", @SW_MINIMIZE)

 

Link to comment
Share on other sites

You can also do like this

$oIE = ObjCreate ( 'InternetExplorer.Application' )
$oIE.Visible = 1
$oIE.Left = 0
$oIE.Top = 0
$oIE.Width = @DesktopWidth
$oIE.Height = @DesktopHeight
$oIE.Navigate ( "https://www.autoitscript.com/forum" )

 

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...