View Full Version : Print Screen

Analog Kid
01-29-2004, 11:37 AM
Can I use "Application.RunScriptFile" to send a screen print to the printer?

Why wouldn't that work? Of course, I've tried it and it doesn't work.

I save a NotePad file as a .lua, using javascript "window.print" and call that file on mouse click.

That really ought to work unless I don't have a clear understanding of the process. It works fine for the "Hello World" alert.

What am I doing wrong? I've tried window.print(); - (window.print) - javascript(window.print); .... nothing.

Any help?

01-29-2004, 02:43 PM
You can't run javascript with Application.RunScriptFile.

As it says in the help file:

Executes the contents of an external script file (.lua).

A script file is simply a text file containing AutoPlay script.

01-29-2004, 05:39 PM
You can execute Javascripts by putting a web browser object on you page, and then just navigate it to the URL:

javascript: print();

should work...

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

Analog Kid
01-30-2004, 10:40 AM
Hmmmm..... Would that print what was in the browser or can it be tricked to print a screen shot?

01-30-2004, 11:01 AM
That would depend on your Javascript, I was merely pointing out they can be executed using a browser object. I have no experience taking screencaps dynamically...

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)