1

Ok I am pretty sure I am making some stupid mistake here. This is what I got. I want to use javascript to run an Imacro to open www.google.com.

  var test;
  test ="CODE:";
  test +="SET !ERRORIGNORE YES "+"\n";
  test +="URL GOTO=www.google.com "+"\n";

  iimPlay(test)

As per @Bestmacros I changed the code for test.js to the code shown above. Putting this into chrome and firefox simply shows me the file, putting it into IE just reloads the page. Double clicking the .js file comes up with a compiler error.

 line: 6
 char: 1
 error: Object expected
 code: 800A138F
 source: Microsoft JScript runtime error

Any suggestions?

Thank you.

Michael Miner
  • 964
  • 2
  • 17
  • 39
  • Are you loading "test.js"? Where is `iimPlay` defined? – Mike Samuel Jan 16 '14 at 17:53
  • test.iim file format is wrong - rename it to test.js and add iimPlay(test); at the end – Bestmacros Jan 16 '14 at 19:23
  • @Bestmacros I updated the code to be as you explained (as this is also from an example elsewhere) I also included there errors encountered when trying to use the test.js file – Michael Miner Jan 16 '14 at 20:21
  • " Double clicking the .js file comes up with a compiler error." This is the problem. You are not running the script in iMacros. Use this tutorial to see how to install iMacros and run script. >>> http://www.youtube.com/watch?v=36ZEgrKJxeU – edinvnode Jan 16 '14 at 22:51
  • I will watch that and tell you how it goes. I have the code in an imacro now. But it tells me "var" is unrecognized. I hope the video will clear that up. Thanks! – Michael Miner Jan 16 '14 at 23:27
  • The file has to be .js not .iim or .js.iim . If you place that code into .js file it will work for sure. – edinvnode Jan 17 '14 at 06:16

1 Answers1

0

i had the same problem but it worked after i had renamed the javascript filename and extension to lovercase.

Martin
  • 1