Sign in to follow this  
Followers 0
ileandros

_IEGetObjById()

19 posts in this topic

Hello,

I'm trying to get controlID of an web image but i cannot. I have tried this way and i dont know if its correct.

$obj = _IEGetObjById($oIE,"imagereg")

I don't know if this is the right way to do it.. Any suggestions??

All kind of help will be apreciated :oops:


I feel nothing.It feels great.

Share this post


Link to post
Share on other sites



<img width="201" height="61" id="imagereg" alt="" src="image.php?type=hv&hash=84b496649aa3a7077ce3ac7e02077960" border="0"/>

this is the code from source code.

I cant post the site because you have to be a member to join it :/


I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

How about a screenshot of the object you're trying to click on. To be honest, the only time I see "imagereg" of type "hv&hash" is when encountering a captcha.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Yes, that is a captcha. Something that is not discussed on this forum. Check the forum rules under automating site logins.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

It is not automating site logins. Did you saw any logins??? I want to display the img on a form like this.

$hForm1 = GUICreate("form1", 674, 220, 195, 130)
$oIE = _IECreateEmbedded()
$read = GUICtrlCreateObj($oIE,295,35,330,110)
GUISetState(@SW_SHOW)
_IENavigate($oIE,"$url")
$obj = _IEGetObjById($oIE,"imagereg")
$obj.ScrollIntoView()

I know the rules and i know it is not allowed. I wouldnt post it if it was automating site logins.

Edited by ileandros

I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

If that's all there is to it, you are using the function correctly.

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

Dale

Yes thats all but i get the error that the id is invalid. I dont know why... I click the image with click element (Ctrl + B ) and that is the line im getting. So i try to catch it with id and gives me invalid error...


I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

If you're going to give important information, like error messages, a spoonful at a time, I have no desire to participate in this discussion.

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

Dale

Sorry it is my mistake. Please tell me what you need because i dont really know what you need to help me..

This is the error msg i get.

--> IE.au3 V2.4-0 Warning from function _IEGetObjById, $_IEStatus_NoMatch (imagereg)

I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

I would suggest you check for frames. NOMATCH should be pretty self-explanatory.

If that doesn't do it for you, start over. Explain what you are trying to do, what you have tried, what doesn't work the way your expect it to and what happens instead. Do all of this as if we had not idea what you are doing - because we don't.

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

Well lets see. Its a captcha and what im trying to do it this: I am trying to $obj.ScrollIntoView(). Which means i have created an embedded which navigates the $url and i try to catch the ID (controlID) of the captcha so i can scroll on it. This is the script

$hForm1 = GUICreate("form1", 674, 220, 195, 130)
$oIE = _IECreateEmbedded()
$read = GUICtrlCreateObj($oIE,295,35,330,110)
GUISetState(@SW_SHOW)
_IENavigate($oIE,"$url")
$obj = _IEGetObjById($oIE,"imagereg")
$obj.ScrollIntoView()

And this is the id of the captcha..

<img width="201" height="61" id="imagereg" alt="" src="image.php?type=hv&hash=92df787ac89cdec643d77bfd1ada41a6" border="0"/>

this is the error im getting with the script above...

[font=monospace]
--> IE.au3 V2.4-0 Warning from function _IEGetObjById, $_IEStatus_NoMatch (imagereg)[/font]

As i understand the problem is that i cannot catch a captcha from id... i dont know why but i cant. Is it possible to work on a captcha?? You have a picture above if you want to check it.


I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

Hello,

Have you tried putting a sleep between Navigate and GetObjet?

Sometimes the hand is made ​​while the page is completely loaded

Brgds

Share this post


Link to post
Share on other sites

Hello,

Have you tried putting a sleep between Navigate and GetObjet?

Sometimes the hand is made ​​while the page is completely loaded

Brgds

Yes i have already tried that but nothing changed...:/

I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

Bump. Anyone help???


I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

Hello,

OK, have you tried to see what really contained the body?

(_IEBodyReadHTML(ByRef $o_object) => _IEBodyReadHTML($oIE) in your case

Brgds

Share this post


Link to post
Share on other sites

Hello,

OK, have you tried to see what really contained the body?

(_IEBodyReadHTML(ByRef $o_object) => _IEBodyReadHTML($oIE) in your case

Brgds

Yes of course but i had no chance...:/ and i dont think that really could help. The question is that is it possible to get controllID of a captcha?????????

I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

This whole thread is against the forum rules regarding no asking for help with captcha

Breaking CAPTCHA's, by-passing anti-bot measures or other methods for by-passing software activation

http://www.autoitscript.com/forum/forum-2/announcement-13-forum-rules/


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Tired of this thread being reported. Locking it.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0