autoit - WinWaitActive auf Internetseiten

05/18/2009 19:17 N8fox#1
hi,
ich als autoit Neuling habe mal eine Frage. Ich will mir einen autologin script schreiben. Habe soweit auch schon alles hinbekommen, aber nun habe ich eine Frage ich will das die Internetseite vollständig geladen ist und dann soll erst mein script vorfahren. Ich habe es mit WinWaitActive probiert doch das klappt nicht so wie ich mir das denke. Er fängt immer zu für an und klappt es nicht. Ich will nicht so was mit sleep machen, weil ich da dann irgendwie schätzen muss.

also so sieht das bei mir im Moment aus. Da wo ich nicht weiter komme habe ich es in rot geschrieben. Also ich habe es auch mit dem Ganzen Fenstertitel probiert.

Quote:
$input1 = InputBox ("Name der Internetseite automatische Anmeldung" , "Bitte gebe hier deinen Benutzernamen ein")
$input2 = InputBox ("Name der Internetseite automatische Anmeldung" , "Gib nun bitte dein Passwort ein")
run ("C:\Program Files\Mozilla Firefox\firefox.exe")
WinWaitActive ("Mozilla Firefox")
send ("Name der Internetseite")
send ("{enter}")
WinWaitActive ("Startseite")
send ("{tab}")
send ($input1)
send ("{Tab}")
send ($input2)
send ("{enter}")
Exit


Nightfox
05/18/2009 19:20 Adroxxx#2
Flasches Forum.
#moved
05/19/2009 22:44 kknb#3
nimm halt die udf ie.au3 oder ff.au3 damit kannste den status der seite leicht abfragen. winwaitactive hat rein garnichts mit dem ladezustand der seite zu tun, winwaitactive wartet halt nur solange bis das fenster im vordergrund ist, aber die seite muss noch garnicht fertig geladen haben.

und da ich grad gute laune habe hier mal ein auszug aus der hilfe für _iecreate ^^

in deinem falle ist wohl wait der parameter der für dich interessant ist ;)

Quote:
Create an Internet Explorer Browser Window.


#include <IE.au3>
_IECreate ( [$s_Url = "about:blank" [, $f_tryAttach = 0 [, $f_visible = 1 [, $f_wait = 1 [, $f_takeFocus = 1]]]]] )




Parameters

$s_Url Optional: specifies the Url to navigate to upon creation
$f_tryAttach Optional: specifies whether to try to attach to an existing window
0 = (Default) do not try to attach
1 = Try to attach to an existing window
$f_visible Optional: specifies whether the browser window will be visible
0 = Browser Window is hidden
1 = (Default) Browser Window is visible
$f_wait Optional: specifies whether to wait for page to load before returning
0 = Return immediately, not waiting for page to load
1 = (Default) Wait for page load to complete before returning
$f_takeFocus Optional: specifies whether to bring the attached window to focus
0 = Do not bring window into focus
1 = (Default) bring window into focus



Return Value

Success: Returns an object variable pointing to an InternetExplorer.Application object
Failure: Returns 0 and sets @ERROR
@Error: 0 ($_IEStatus_Success) = No Error
1 ($_IEStatus_GeneralError) = General Error
3 ($_IEStatus_InvalidDataType) = Invalid Data Type
4 ($_IEStatus_InvalidObjectType) = Invalid Object Type
6 ($_IEStatus_LoadWaitTimeout) = Load Wait Timeout
8 ($_IEStatus_AccessIsDenied) = Access Is Denied
9 ($_IEStatus_ClientDisconnected) = Client Disconnected
@Extended: Set to true (1) or false (0) depending on the success of $f_tryAttach