We help IT Professionals succeed at work.

Need examples of browser manipulation in AutoIT

I want to create code with the algorithim below in AutoIT. I am using ie7.

500 for working code, 250 for an answer that helps me write my own code.


If window  with myURL is showing then
     Exit
End if

Create a new Ie Window with the blank url
wait for it to be ready
Invoke my browser URL
hide the tool bar
hide the status bar
maximize
make it visible
exit
Comment
Watch Question

Christopher ScheneSystem Engineer/Software Engineer

Author

Commented:
increase points
BRONZE EXPERT
Commented:
Just change out Google for whatever the Title of your page is and also the url for it to navigate to.

Cheers
#NoTrayIcon
#include <IE.au3>
If WinExists('Google') Then Exit

$IE_OBJECT = _IECreate('about:blank', 0, 1, 1, 1)
$IE_HANDLE = _IEPropertyGet($IE_OBJECT, 'hwnd')
	WinSetState($IE_HANDLE, '', @SW_MAXIMIZE)
_IEPropertySet($IE_OBJECT, 'toolbar', False)
_IEPropertySet($IE_OBJECT, 'statusbar', False)
_IENavigate($IE_OBJECT, 'www.google.com', 1)

Open in new window

Christopher ScheneSystem Engineer/Software Engineer

Author

Commented:
I am working on this.,,,stand by for points
Christopher ScheneSystem Engineer/Software Engineer

Author

Commented:
this test does not seem to work:

If WinExists('Google') Then Exit

as it brings up a new google window each time
BRONZE EXPERT
Commented:
I just put that title in as a test, since Google is region specific, assumed you were going to enter your own url and title.  YouTube would probably be a better example see below:
Basically the Title in "WinExists" reads from left to right so you need to enter in the full title name or a partial name of the Window, so for YouTube you could use "YouTube", "YouT" or even "You", however this is looking at the title of all open windows so it's best to be as specific as possible.
 
#NoTrayIcon
#include <IE.au3>
If WinExists('YouTube') Then Exit

$IE_OBJECT = _IECreate('about:blank', 0, 1, 1, 1)
$IE_HANDLE = _IEPropertyGet($IE_OBJECT, 'hwnd')
	WinSetState($IE_HANDLE, '', @SW_MAXIMIZE)
_IEPropertySet($IE_OBJECT, 'toolbar', False)
_IEPropertySet($IE_OBJECT, 'statusbar', False)
_IENavigate($IE_OBJECT, 'www.youtube.com', 1)

Open in new window

Christopher ScheneSystem Engineer/Software Engineer

Author

Commented:
I have been on holiday away from my computer for the last week....thanks for your patience