Sign in to follow this  
Followers 0
julmae

ie.au3 question

5 posts in this topic

ok so heres my situation, i have form on 'main' site where i would like to set value but form is loaded from cookie.

from main script :

<script language="javascript" src="cookie.js"></script>

and from cookie :

+"<tr><form><td>Transfer <input type=text SIZE=10 MAXLENGTH=10 name=k value=''>

so im asking is there a way to get pointer to that form and use _IEFormElementSetValue($o_object, $var) on the main site ?

Share this post


Link to post
Share on other sites



ok so heres my situation, i have form on 'main' site where i would like to set value but form is loaded from cookie.

from main script :

<script language="javascript" src="cookie.js"></script>

and from cookie :

+"<tr><form><td>Transfer <input type=text SIZE=10 MAXLENGTH=10 name=k value=''>

so im asking is there a way to get pointer to that form and use _IEFormElementSetValue($o_object, $var) on the main site ?

Instead of using View Source, use _IEDocReadHTML to get the final state of the dynamic page. That will show you what you really have to work with.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks i did that and discovered new block of code, but still i cant seem to interact with it.

SCRIPT language=javascript><!--
function fightdelay(){
if(lastaction!="m"&&lastaction!="t"&&lastaction!="o"&&lastaction!="v"&&lastaction!="k2"&&lastaction!="k3"&&lastaction!="rf"&&lastaction!="q"){

  if(bdelay>0){
    setTimeout("fightdelay()","600");

    if(mx==1){
      top.toiminta.attb.innerHTML="<input type=button value=' ... '>";
      top.toiminta.casb.innerHTML="<input type=button value=' ... '>";
      top.toiminta.nefb.innerHTML="<input type=button value='  ...  '>";
    }   
    }
else{
    if(mx==1){
      top.toiminta.attb.innerHTML="<input type=button value=' use weapon ' id='btn_attack' name='btn_attack' onclick='this.disabled=true;top.delNF();top.fightAction();'>";
      top.toiminta.casb.innerHTML="<input type=button value=' cast spell ' id='btn_cast' name='btn_cast' onclick='this.disabled=true;top.delNF();top.castAction();'>";
    }
   top.toiminta.nefb.innerHTML="<input type=button value='Fight again' onclick='this.disabled=true;top.newFightAction()'>";
  }
  bdelay-=30;
  }
} 
function delNF() {
    top.toiminta.nefb.innerHTML="<input type=button value='Fight again' onclick='java script:void(#);'>";
}
//--></SCRIPT>

i would like to get objects pointing to 'btn_attack' and 'btn_cast' (and maybe that fight again button, but there doesnt seem to be any id nor name).

any and all help would be preciated 8)

Edited by julmae

Share this post


Link to post
Share on other sites

The scripts will be activated through interaction with HTML elements on the page -- seeing this code is of no use.

You need to study the HTML on the dynamically created and figure out how to interact with the HTML elements found there.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Or you could just play the darn game instead of cheating.

A

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