Sign in to follow this  
Followers 0
Lakes

_IENavigate problem

17 posts in this topic

#include <IE.au3>
$oIE = _IECreate ("http://www.meetcam.com")
$oForm = _IEFormGetObjByName ($oIE, "form1")
$oQuery = _IEFormElementGetObjByName ($oForm, "username")
_IEFormElementSetValue ($oQuery, "My Username") ;put your username here
$oQuery = _IEFormElementGetObjByName ($oForm, "password")
_IEFormElementSetValue ($oQuery, "My Password") ;put your password here
_IEFormSubmit ($oForm)
_IELoadWait($oIE)

$begin = TimerInit()
_IENavigate ($oIE, "http://www.meetcam.com/forum/")      ;why is this taking so long?
$dif = TimerDiff($begin)
MsgBox(0,"Page loaded after",$dif)

Exit

I need some help on this please.

Thanks.


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites



try this instead of _IEnavigate()

$oIE.navigate "http://www.meetcam.com/forum/"

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

try this instead of _IEnavigate()

$oIE.navigate "http://www.meetcam.com/forum/"
Gives Error:The requested action with this object has failed, after the same delay.

It does`nt matter which page you goto, it be Google or anything, there`s always the same delay.

Edited by Lakes

2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

By default, _IENavigate will wait for IE to report that the load of the page is complete before returning control to the script. I you don't care if the page is complete, then set $f_wait to 0. This does essentially what codemyster mentions in the previous reply.

The real question would be why does it take so long for the page load to complete?

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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

By default, _IENavigate will wait for IE to report that the load of the page is complete before returning control to the script. I you don't care if the page is complete, then set $f_wait to 0. This does essentially what codemyster mentions in the previous reply.

The real question would be why does it take so long for the page load to complete?

Dale

Same thing happens if $fwait to 0, it only does it in the script, a manual click takes you there stright away..

Copy and paste the Forum address into the address bar takes you there with no delay either...

Edited by Lakes

2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

You'll need to explain what you mean by "taking so long"

Edit: typo

Edited by DaleHohm

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

Share this post


Link to post
Share on other sites

You'll need to explain what you mean by "taking so long"

Edit: typo

There is a delay of about 3mins before it naviagates to the forum page.


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

#include <IE.au3>
$oIE = _IECreate ("http://www.meetcam.com")
$oForm = _IEFormGetObjByName ($oIE, "form1")
$oQuery = _IEFormElementGetObjByName ($oForm, "username")
_IEFormElementSetValue ($oQuery, "User")
$oQuery = _IEFormElementGetObjByName ($oForm, "password")
_IEFormElementSetValue ($oQuery, "pass")
_IEFormSubmit ($oForm)

$begin = TimerInit()
_IENavigate ($oIE, "http://www.meetcam.com/forum/",0) ;why is this taking so long?

$dif = TimerDiff($begin)
MsgBox(0,"Page loaded after",$dif)

Exit

The Timerdif result is 116ms, yet I know it taking about 3mins as I timed it!

Very odd.


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

Please output a timestamp after each line so that you can verify how long each one takes.


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

Share this post


Link to post
Share on other sites

Please output a timestamp after each line so that you can verify how long each one takes.

Thanks Dale, it was _IEFormSubmit that was pausing the script, adding a no wait flag solved this problem, even though I don`t know what it was waiting for! :whistle:

Anyway Thanks again! ;)


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

It was waiting on a COM error that it expected to be transient, but wasn't. I'll has some sort of a fix for this in a future release.

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

Share this post


Link to post
Share on other sites

Thanks for your help, keep up the good work! :whistle:


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

Still IE related, so I`ll continue on here as its the same website.

I can auto-signin to the chat room, but then I have to click on YES to accept the site rules.

What this is, is a RichEdit Textbox which has the words YES and NO as links in the Rich Edit control.

These links are not found by the _IELinkGetCollection function.

So, how do I click on a link in an embedded RichEdit TextBox in a browser?

Thanks for your help.

Edited by Lakes

2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

Still IE related, so I`ll continue on here as its the same website.

I can auto-signin to the chat room, but then I have to click on YES to accept the site rules.

What this is, is a RichEdit Textbox which has the words YES and NO as links in the Rich Edit control.

These links are not found by the _IELinkGetCollection function.

So, how do I click on a link in an embedded RichEdit TextBox in a browser?

Thanks for your help.

There is nothing called a rich edit text box in HTML .

If you know what the actual HTML and one structure is there might be a chance.

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

Share this post


Link to post
Share on other sites

Here are the Auto Window info details:

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: Chat :: MeetCam.com - Microsoft Internet Explorer

Class: IEFrame

Size: X: 421 Y: 74 W: 1144 H: 933

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 815 Y: 609

Cursor ID: 5

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0xFFFFFF Dec: 16777215

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: 8 Y: 209 W: 900 H: 563

Control ID: 205

ClassNameNN: RichEdit20W1

Text:

Style: 0x50018844

ExStyle: 0x00000000

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

(1): Done

(2):

(3):

(4):

(5):

(6):

(7):

(8): Internet

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

Links

http://meetcam.com/chat.php#cht1

http://meetcam.com/chat.php#cht1

Done

Please read the rules before entering the rooms. Ask any ops for help

***EDIT ***

[Lots of Rules which we are of no interest here]

***ENDEDIT ***

Do you agree? Yes No

Create room

Help

Hands Free

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

Search

Search

b

Here is the page source:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//RU">

<HTML>

<HEAD>

<meta name="title" content="Chat :: MeetCam.com.">

<meta name="KeyWords" content=".">

<meta name="Description" content=",.">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<meta name="Author" content=".">

<TITLE>Chat :: MeetCam.com</TITLE>

<style>

Body {

background-color:#85add4;

background-image:url(/tpls/.images/backgrd.gif);

margin:0px;

}

</style>

<link href="/tpls/.images/css/main.css" rel="stylesheet" type="text/css">

<link href="/tpls/.images/css/add1.css" rel="stylesheet" type="text/css">

<script language="Javascript" type="text/Javascript" src="/tpls/.images/js/main.js"></script>

</HEAD>

<BODY>

<a name="cht1"></a><script language="javascript" type="text/javascript">

var cfweb_clsid = "clsid:2357B3CF-7F8D-4451-8D81-FD6097610AEE";

var cfweb_codebase = "http://activex.camfrogweb.com/advanced/2.0.1.10/cfweb_activex.camfrogweb.com-advanced-2.0.1.10_instmodule.exe#version=2,0,1,10";

var cfweb_params = {

"controlworkmode":"1",

"cfsservername":"209.200.46.84",

"cfsserverport":"6007",

"helplinkurl":"http://meetcam.com/docs.php?p=help.htm",

"profilelinkurl":"http://meetcam.com/profiles.php?a=view&nick=%s&PHPSESSID=%s",

"sessionID":"0f0374950d65ae13c0be7c16886aa968",

"userNickname":"GreenHornet",

"userGender":"3",

"userAge":"48",

"skinPath":"http://meetcam.com/download/skin_pro.zip#version=14"

};

</script>

<div id="cfwebDiv"/>

<script language="javascript" type="text/javascript" src="/cfw.js"></script>

</BODY>

</HTML>

As you can see its javascript, but Autoit does see it as a RichEdit control.

2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

Gack! An ActiveX Control... There are ways to interact with them using the methods and properties they expose (see the OLE/COM Viewer description in the Obj/COM section of the AutoIt helpfile), but I have not tried going there...

I would invite you to become the forum expert on the subject and share your learnings back with the group :-)

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

Share this post


Link to post
Share on other sites

Gack! An ActiveX Control... There are ways to interact with them using the methods and properties they expose (see the OLE/COM Viewer description in the Obj/COM section of the AutoIt helpfile), but I have not tried going there...

I would invite you to become the forum expert on the subject and share your learnings back with the group :-)

Dale

LOL! I`ll see what I can do... :whistle:

I can think of another way of doing this but its clunky...


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
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
Sign in to follow this  
Followers 0