ItchyBalls666 Posted November 13, 2008 Share Posted November 13, 2008 Hello guys, I've been trying to create a simple autoit program that automatically create accounts for you by performing a series of macros. However, when i try to obtain img/links/forms from this site, nothing shows up. Therefore I am unable to continue with my program. I just want to ask if i am doing something wrong with my coding or if the site is encrypted in some way and how to get past it. Thanks in advance #include <IE.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> #include <Array.au3> $oIE = _IECreateEmbedded() $Form1 = GUICreate("Form1", 779, 587, 193, 125) $Input1 = GUICtrlCreateInput("ID", 592, 8, 177, 21) $Input2 = GUICtrlCreateInput("Password", 592, 40, 177, 21) $Input3 = GUICtrlCreateInput("Secret Answer", 592, 72, 177, 21) $Button1 = GUICtrlCreateButton("Create", 592, 104, 177, 25, 0) $Button2 = GUICtrlCreateButton("Refresh", 592, 136, 177, 25, 0) $Gui = GUICtrlCreateObj($oIE, 8, 8, 572, 569) GUISetState(@SW_SHOW) _IENavigate($oIE, "http://www.joymax.com/portal/", 1) ;_IEimgClick($oIE, "http://img.joymax.com/property/joymax/joymax_portal_2/icon_img/but_img/acc_03.gif") ;_IENavigate($oIE, "https://www.joymax.com/portal/Joymax_Front.jmx?workURL=https://portalcp.joymax.com/member/memberJoin.jmx&returnURL=http://www.joymax.com/portal/Joymax_Front.jmx?workURL=http://portalcp.joymax.com/Joymax.jmx", 1) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button1 $oImgs = _IEimgGetCollection($oIE) MsgBox(1, " ", @extended) For $oImg in $oImgs ConsoleWrite($oImg.src & @CR) Next ;_IEFormImageClick($oIE, "https://img3.joymax.com/property/joymax/joymax_portal_2/icon_img/but_img/agree.jpg") EndSelect WEnd Link to comment Share on other sites More sharing options...
jvanegmond Posted November 14, 2008 Share Posted November 14, 2008 If you can't find any <img src="xxx"> tags in the HTML code you won't be able to find them with _IEImgGetCollection. This often happens in dynamic pages that rely on Javascript or AJAX. In that cause, you won't be able to automate the webpage ( at least, my attempts so far have been unsuccesful. ) github.com/jvanegmond Link to comment Share on other sites More sharing options...
ItchyBalls666 Posted November 14, 2008 Author Share Posted November 14, 2008 Oh I see, thanks for the useful information. Are there any alternatives to this? I made one using a series of send() and mouseclicks(), but I don't it is too reliable. Link to comment Share on other sites More sharing options...
jvanegmond Posted November 14, 2008 Share Posted November 14, 2008 (edited) Oh I see, thanks for the useful information. Are there any alternatives to this? I made one using a series of send() and mouseclicks(), but I don't it is too reliable.There are a few methods you might use to improve reliability of your application. There is no standard set of methods, so I'm just going to give you the methods I use often.× Use Win* to check the title of the application× Use _IE functions to check on what page exactly you are, or to automate any forms× Use a minimal amount of Send or Mouse* functions, replace them with _IE functions as much as you can× Use ClientCoordMode, and other AutoIt options to get optimal performance and reliabilityI might have more tips for you later.. Edited November 14, 2008 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
ItchyBalls666 Posted November 15, 2008 Author Share Posted November 15, 2008 Thanks for the reply, I am able to successfully get the full title of the application, which is the title of the GUI. But as far as the _IE functions goes, I think the site, like you've said, is a "dynamic page that relies on javascript or AJAX". Therefore I am unable to obtain any information for the website using _IE functions. All the @extended = 0 and no img/form/elements/links are found. Link to comment Share on other sites More sharing options...
Valuater Posted November 15, 2008 Share Posted November 15, 2008 use this to see what you can gethttp://www.autoitscript.com/forum/index.ph...st&p=1337678) Link to comment Share on other sites More sharing options...
ItchyBalls666 Posted November 15, 2008 Author Share Posted November 15, 2008 (edited) Extremely useful, thanks:mellow: Edited November 15, 2008 by ItchyBalls666 Link to comment Share on other sites More sharing options...
Valuater Posted November 15, 2008 Share Posted November 15, 2008 Welcome 8) Link to comment Share on other sites More sharing options...
ItchyBalls666 Posted November 15, 2008 Author Share Posted November 15, 2008 Extremely useful, thanks:mellow: Nvm, contains errors. My bad for double posting, the edit link was gone:( Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now