Jump to content

check if a window is done loading


cdkid
 Share

Recommended Posts

is there any way to check if a window is done loading (a firefox browser in particular here)

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

or is there a way to reference firefox COM objects...if there are any

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

I'm not a firefox user... but is it like IE where the status bar says "Done" when it is finished loading? That might be one way.

Another could be to check the file size of the page using InetGetSize, then compare that to the downloaded html (as text) so far... I think that would get messy.

Hope that perhaps gets something turning... wish I could be more help.

LD

Link to comment
Share on other sites

or is there a way to reference firefox COM objects...if there are any

is there a status bar update or anything? i don't use the browser myself, but there is probably a status bar line you could read. as far as COM objects, if i remember correctly, someone said that com couldn't be used w/ firefox.
Link to comment
Share on other sites

thanks guys...i had a brainfart didnt even think of using the status bar :lmao:

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

is there a status bar update or anything? i don't use the browser myself, but there is probably a status bar line you could read. as far as COM objects, if i remember correctly, someone said that com couldn't be used w/ firefox.

For those interested in the Mozilla ActiveX Control. Never tried it, but for those with nothing else to do!

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

hhmmm i cant use the status bar text cuz it isnt a real status bar...i used the Au3Info tool and it didnt show any status bar text even tho what looked to be the status bar said 'done' odd :lmao:

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

any1 know how to use this mozilla activex control?

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

any1 know how to use this mozilla activex control?

Does not look like you can. :lmao:

I tried the IE example in the help file with the Mozilla object (Mozilla.Browser.1), but all I get are errors. The page sort of loads, the error kills it. I tried the control in VB and it works fine. I do not think that you can create the object at runtime.

I assume that you have looked into the WinGetState function that returns whether the window is visible and/or active?

Edited by Stumpii

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

Never mind, I have got it to work. Here is the code, basically copied from the help IE example, but with the Mozilla control AND killing of the Mozilla control before the form closes (otherwise you get errors).

CODE

#include <GUIConstants.au3>

$oIE = ObjCreate("Mozilla.Browser.1")

; Create a simple GUI for our output

GUICreate ( "Embedded Web control Test", 640, 580,(@DesktopWidth-640)/2, (@DesktopHeight-580)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$GUIActiveX = GUICtrlCreateObj ( $oIE, 10, 40 , 600 , 360 )

$GUI_Button_Back = GuiCtrlCreateButton ("Back", 10, 420, 100, 30)

$GUI_Button_Forward = GuiCtrlCreateButton ("Forward", 120, 420, 100, 30)

$GUI_Button_Home = GuiCtrlCreateButton ("Home", 230, 420, 100, 30)

$GUI_Button_Stop = GuiCtrlCreateButton ("Stop", 330, 420, 100, 30)

GUISetState () ;Show GUI

$oIE.navigate("http://www.autoitscript.com")

; Waiting for user to close the window

While 1

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

$oIE = 0

ExitLoop

Case $msg = $GUI_Button_Home

$oIE.navigate("http://www.autoitscript.com")

Case $msg = $GUI_Button_Back

$oIE.GoBack

Case $msg = $GUI_Button_Forward

$oIE.GoForward

Case $msg = $GUI_Button_Stop

$oIE.Stop

EndSelect

Wend

GUIDelete ()

Exit

To get this to work, you need to first download the Mozilla ActiveX control from here. Then to be able to create on the fly in AutoIt, you need to unregister 'mozctl.dll' in the installation folder (C:\Program Files\Mozilla ActiveX Control v1.7.12 in my case) and register 'mozctlx.dll' in the same folder. To do this, open command prompt, navigate to the folder and type 'regsvr32 -u mozctl.dll' and then 'regsvr32 mozctlx.dll'.

The code should then run. The interface is the same as IE, so program with the IE control first, then swap for Mozilla.

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

  • Moderators

This is something I found, not sure if it will help or not.

Command line options:

Open URL with FireFox: Firefox "www.mozilla.org"

Launch Mozilla in Quick Launch mode: FireFox -turbo

Set window height: FireFox -height xxx

Set window width: FireFox -width xxx

Link to comment
Share on other sites

For those interested in the Mozilla ActiveX Control. Never tried it, but for those with nothing else to do!

I have done some work with this while trying to help another user. Be aware that it implements (I think I remember correctly) compatability with IE3 -- and the standard release today is IE6.

One of the only compelling reasons to use this over IE COM as far as I could tell is the IE license agreement compared to Mozilla -- if you are in a position to care about this, then it is significant, but if you are not I think you are just buying yourself a lot of hassle with little return. Those who hate IE because it is IE, please try it for yourself because I won't argue with you about it.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

I have done some work with this while trying to help another user. Be aware that it implements (I think I remember correctly) compatability with IE3 -- and the standard release today is IE6.

One of the only compelling reasons to use this over IE COM as far as I could tell is the IE license agreement compared to Mozilla -- if you are in a position to care about this, then it is significant, but if you are not I think you are just buying yourself a lot of hassle with little return. Those who hate IE because it is IE, please try it for yourself because I won't argue with you about it.

Dale

Good point. The control implements compatibility with IE4. I would say that anyone that wants a simple browser pane to show an HTML readme, etc. should take a look. If you want to examine the forms or HTML makeup of a webpage, then you are probably better off using IE.

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

yeah, i prefer IE but a lot of ppl in my clan want scripts that'll log em into the website n such & they like FF...thanks for the help everyone

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...