Sign in to follow this  
Followers 0
Vampire

Possibily of being able to be done?

21 posts in this topic

So I'm writing a autoit script obviously, and I need help...

What I want to be able to do, is search a internet explorer screen for a certain size box, the box never changes size. but it does move. Is it possible to search this box out without using color search? Search for it by dementions instead of colors? If so how would I do that?

Share this post


Link to post
Share on other sites



If it's a html object like a textbox then you could get the pages collection of form objects then see if any have the size propertys that you are looking for. You could do this using IE.au3 and DOM


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

So I'm writing a autoit script obviously, and I need help...

What I want to be able to do, is search a internet explorer screen for a certain size box, the box never changes size. but it does move. Is it possible to search this box out without using color search? Search for it by dementions instead of colors? If so how would I do that?

That depends on whether or not the box is actually in the html source or if it's in a .js file.

Open the page in Internet Explorer and the go to View>Source (on the IE menu bar). Find the section of the code where the box is being created and post that section of code. Include 5 or 6 lines of the code on either side of the box code. and post that in here. If you can't find it then post a link to the page.

If it's in the HTML code then I think there's a function in IE.au3 that should do it.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

ok, hold I'll edit this with code

Edited by Vampire

Share this post


Link to post
Share on other sites

What is the goal you are trying to achieve once you find the box?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

<input type=button value="Back" onclick="document.location='i.cfm?&r239&f=sc_research';" class=pic> <input type=button value="Start Research !" name=ydvqnb onclick="x1ggcey(ydvqnb);"><br>

I want to click that.

Edited by Vampire

Share this post


Link to post
Share on other sites

heres the gist of it you'll have to change it yourself, now in the case that the name of the button is always changing the code will have to be modified to grab the button by index and not name

First change YourURL.com to the Url of the page

Find the form name should be something like <Form name="somename"> (could be other stuff but you just want whats ever inbewteen the 2 ""

Put that name in where it says Form Name and try it out

#include <IE.au3>

$oIE = _IECreate("YOURURL.com")
$oForm = _IEFormGetObjByName($oIE,"FORM NAME")
$oButton = _IEFormElementGetObjByName($oForm,"ydvqnb")
_IEAction($oButton,"click")

Share this post


Link to post
Share on other sites

<input type=button value="Back" onclick="document.location='i.cfm?&r239&f=sc_research';" class=pic> <input type=button value="Start Research !" name=ydvqnb onclick="x1ggcey(ydvqnb);"><br>

I want to click that.

Thatsgreat2345 has the answer you need. You need the function from IE.au3 in your include folder.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Ok another question. Let's say the URL changes everytime you click the button, and you want it to repeat clicking the button. Would it still use the same method or a different one?

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

ok, so I coded it, and it keeps opening windows, not clicking the button...

#CS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;
;                                            Research bot
;                                            Credits: IcE
;                                               Version 1.0
;
;
#CE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#include <IE.au3>
;=====================================================
;  Define .ini reading and #includes
;=====================================================
Global $Paused
HotKeySet("{END}", "Terminate")
Hotkeyset("{INSERT}", "scan")
;====================================================================================
;  .ini reading!
;====================================================================================
$time1 = IniRead("global.ini", "Global", "delay1", "");
$time2 = IniRead("global.ini", "Global", "delay2", "");
$url = IniRead("global.ini", "Global", "url", "");

;=====================================================
;  Body
;=====================================================
While 1
    Sleep(100)
WEnd
;=====================================================
;  scan
;=====================================================
Func scan()
  $Paused = NOT $Paused
    While $Paused

$oIE = _IECreate($url)
$oForm = _IEFormGetObjByName($url,"Start Research !")
$oButton = _IEFormElementGetObjByName($oForm,"ydvqnb")
_IEAction($oButton,"click")
_IELoadWait($oIE)
    Sleep(Random($time1, $time2, 1))
Wend
Endfunc
;=====================================================
; End program
;=====================================================
Func Terminate()
       Exit 0
   EndFunc
Edited by Vampire

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

double post.

Edited by Vampire

Share this post


Link to post
Share on other sites

anybody help me with this script? It's posted 2 posts up...

Share this post


Link to post
Share on other sites

Could you give us the URL so we can test ?


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites

Could you give us the URL so we can test ?

It's to a game:

http://uc.gamestotal.com/?in=665131

^ create an account, do the missions up until the point you can research. when you get to where you can research that is where I am. I play on low graphics. and I want to be able to click the start research button. I have a simple coordinate click script with a pixelsearch to avoid the anti-bot button, but the button moves more then the 3 places I want to click, when 1 research level is complete, it moves. When anti-bot research level is complete, it moves....

Share this post


Link to post
Share on other sites

_IEFormGetObjByName($url,"Start Research !")

;should be 

_IEFormGetObjByName($oIE,"Start Research !")

Thats only glaring error, other than playing game I cant help


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites

_IEFormGetObjByName($url,"Start Research !")

;should be 

_IEFormGetObjByName($oIE,"Start Research !")

Thats only glaring error, other than playing game I cant help

So why does the script keep opening another IE window? It only needs to open 1 window... why does it open another? or maybe not even open a window, just do a search in a currently open window?

Share this post


Link to post
Share on other sites

THen you should be using _IEAttach() instead of _IECreate


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites

ok, I'm completely lost on this one, what's the substring to attach it to the internet explorer window?

Share this post


Link to post
Share on other sites

#include <IE.au3>

_IEAttach ( $s_string [, $s_mode = "Title"] )

_IEAttach ("http://www.hotmail.com", "URL") ;URL of website

_IEAttach ("Hotmail Sign In", "Title") ;Title on top of IE window

Like that ;-)


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

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