Libre Posted April 2, 2006 Share Posted April 2, 2006 First i was needed a listview with buttons for each line, then i decided to do with an html file but i need to catch the button click inside the ieObject. To run the apropiate Function inside my script. Here is the code, i only need the way to capture the .onclick event in the button objetc. But i dont know how there is the html file too. Please , help me . #include <IE.au3> #include <Constants.au3> #include <GuiConstants.au3> $GUI = GuiCreate("", 480, 450,-1, -1 ) $oIEConsejo = ObjCreate("Shell.Explorer.2") $GUIActiveXConsejo = GUICtrlCreateObj($oIEConsejo, 20, 60, 440,260) GUICtrlSetStyle($GUIActiveXConsejo, $WS_VISIBLE) $oIEConsejo.navigate (@ScriptDir & "\test.html") $oForm = _IEFormGetObjByName($oIEConsejo, "form1") $oRegion = _IEFormElementGetObjByName($oForm, "btnG") MsgBox(0,"",_IEFormElementGetValue($oRegion)) $oRegion.onclick = "hello()" ;s ? GuiSetState() while 1 $msg = GuiGetMsg() if $msg = $GUI_EVENT_CLOSE then ExitLoop WEnd func hello() MsgBox(0,"","hi!") EndFunctest.html I love this Game :p----------------------Freeware Multilange support or Translate your scripts----------------------aNyBoDy KnOwS WhY A LiGhT iN My KeYbOaRd iS aLlWaIs BlInKiNg !?Who is "General Failure" and what is he doing in my hard disk !!!!!? Link to comment Share on other sites More sharing options...
Libre Posted April 2, 2006 Author Share Posted April 2, 2006 (edited) well i did, this morning i had no idea of javascript ,but there was the solution. Now works. can any "guru" say me if this is "trycky" ? #include <GuiConstants.au3> $GUI = GuiCreate("", 480, 450,-1, -1 ) $oIEConsejo = ObjCreate("Shell.Explorer.2") $GUIActiveXConsejo = GUICtrlCreateObj($oIEConsejo, 20, 60, 440,260) GUICtrlSetStyle($GUIActiveXConsejo, $WS_VISIBLE) $oIEConsejo.navigate (@ScriptDir & "\boton.html") GuiSetState() $tmpHiddenOld = "" while 1 $tmpHidden = $oIEConsejo.document.forms("oculto").item("campo").value if $tmpHidden <> $tmpHiddenOld Then MsgBox(0,"U cliked",$tmpHidden) $tmpHiddenOld = $tmpHidden EndIf $msg = GuiGetMsg() if $msg = $GUI_EVENT_CLOSE then ExitLoop WEndboton.html Edited April 3, 2006 by Libre I love this Game :p----------------------Freeware Multilange support or Translate your scripts----------------------aNyBoDy KnOwS WhY A LiGhT iN My KeYbOaRd iS aLlWaIs BlInKiNg !?Who is "General Failure" and what is he doing in my hard disk !!!!!? 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