Jump to content

Possibily of being able to be done?


Recommended Posts

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?

Link to comment
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!

Link to comment
Share on other sites

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!"

Link to comment
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.

Edited by Vampire
Link to comment
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")
Link to comment
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!"

Link to comment
Share on other sites

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
Link to comment
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....

Link to comment
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!

Link to comment
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?
Link to comment
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!

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...