-2

I have a website which sends info to the developer console of the IE with a funtion called: console.info("spawned", t.name) in javascript. I want to read whats in the console and react to it.

I have no idea. I tried it with $oIE.console.log but there is just no output.

/edit sorry for the short discription here is more:

I tried to get the value of a variable in the javascript with the chrome console not it always says "not defined".

$oIE.document.getElementByID("t").type

and

$o_object.document.parentwindow.eval($s_eval)

did not work either.

Here is the pastebin auf the js: http://pastebin.com/8w4zi7ns

Trojan
  • 485
  • 4
  • 20

1 Answers1

0

I would imagine it would look something like this (assuming console.log is how you would reference it in javascript):

Global $gvData = $oIE.document.parentWindow.eval("console.log")
MsgBox(64 + 262144, "Info", $gvData)
SmOke_N
  • 146
  • 3
  • Thanks, but it didnt work. I tried to get the variable directly over the chrome console but it just says "not defined" – Trojan Mar 16 '15 at 22:29
  • This is intended to help you figure out how to make the javascript call and receive a value. This is only good in Internet Explorer. I do not know the calls you need to do in javascript to read the values. I suggest you use something like debugbar for IE and run your javascript code in the script section to make sure the javascript your calling is even valid first. – SmOke_N Mar 16 '15 at 23:58
  • I am trying to get it first with the console but had no success yet. Tried dumping all vars with `for(var b in window) { if(window.hasOwnProperty(b)) console.log(b); }` but it did not show up. I do not know much about javascript but I think it is because the variable is only used in a function. The console has the object "console" and things like "console.log" but I do not know a method to get the last log. Sth. like "console.getLastLog" – Trojan Mar 17 '15 at 15:52