Add _IEErrorHandlerRegister() to your script and/or some other error checking to see if $obutton actually has a valid object reference in it. If it's buried inside one or more frames for instance there might be some more effort required.
***edit***
sorry, i meant normally. the link wasn't there to try for this page when i'd originally posted. playing with the actual example now...
Edited by cameronsdad, 25 September 2010 - 06:26 PM.
1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz
There is a button type link called "Upload_btn". Just because you loaded a .png file as background for the button does not change it to an IMG tag. You need to treat the button as an ordinary link, not as an IMG:
No, the link is being clicked, but those javascripts from whatever "aircamel.com.tw" is don't respond. You'll have to take that up with those blokes. This works fine:
Ok ! so if i understand well it's the javascript:void(0) who block the click or the action after the click ? I have googleled yesterday for "javascript:void(0)" but i didn't found any understanding answer ! How does the javascript does the difference between real click and false ?
No, javascript:void(0) is NoOp to keep the page from navigating anywhere else while the onclick scripts are run.
In this case the problem is in the .js scripts in the head section, brought from "aircamel.com.tw". They must be broken or intentionally blocking. Note one of them is called "blockUI.js". I assume web masters have techniques available to at least make botting their page difficult. Maybe they don't want you botting that site.
OK, I've taken a look at this and will admit that it is still rather mysterious.
There are two clandestine things happening on this page. First, there is a reliance on the mouse being positioned over the element. There is some event being captured when this happens that is actually triggering the second clandestine occurance... the dynamic creation of an INPUT TYPE=FILE element.
So, the following sequence works, but your script will hang waiting for the file dialog to be dismissed.
OK, with this solution you don't have to even know about the dynamic INPUT element and your script will continue after the file dialog is displayed so that you can interact with it via script:
Ok !
so if i understand well it's the javascript:void(0) who block the click or the action after the click ?
I have googleled yesterday for "javascript:void(0)" but i didn't found any understanding answer !
How does the javascript does the difference between real click and false ?
here's another approach for you that works on my side for your example... use
to get a reference to the button, THEN, you can use mouseclick() to click at the location using $btn.style.Left+10 and $btn.style.Top+10 after doing any necessary offset for window position and then toolbars etc. (in your example it goes at 0,0 so figuring the offset for window and and titlebar should be easy
1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz
OK, I'm done now... it is the onmouseover event that is being used to trigger the dynamic HTML creation. No need to move the mouse on the screen now...
#include <IE.au3>$oIE=_IECreate('http://bible.l2play.com/test.asp',1); trigger dynamic INPUT TYPE=FILE element creation with onmouseover$oElement=_IEGetObjById($oIE,"Upload_btn")$oElement.fireEvent("onmouseover"); The next two lines will bring up the file dialog, but hang script until it is dismissed;$oInput = _IETagnameGetCollection($oIE, "input", 0);_IEAction($oInput, "click"); Alternate method that can be performed on a hidden browser and will not pause script$iBrowserX=_IEPropertyGet($oElement,"browserx")$iBrowserY=_IEPropertyGet($oElement,"browsery")$iWidth=_IEPropertyGet($oElement,"width")$iHeight=_IEPropertyGet($oElement,"height")ControlClick(_IEPropertyGet($oIE,"hwnd"),"","","left",1,$iBrowserX+$iWidth/2,$iBrowserY+$iHeight/2)Exit
1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz