Forum Discussion

mkirkland's avatar
mkirkland
Contributor
14 years ago

Run string as Alias command

After concatenating two(2) strings together, how can i run that string as a command. The concatenated string should return the table cells innertext.



(ie)


function test2()

{

  var a, b, c;

  a =  'Aliases["iexplore"]["pageTest"]["formAspnetform"]["panel1"]["panelCtl01MaincontentUpdatepanel2"]["Table"]';

  b =  '["Cell"](1,0)["innerText"]';

  c =  aqString["Concat"](a, b)

  

  BuiltIn["MessageDlg"](c, mtInformation, mbOK, 0)

}



~This returns the string of 'c' and i want it to actually return the inner text of that entire string.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Try the built in JScript "eval" function.



     c =  eval(aqString["Concat"](a, b))