Skip to main content
Coreydwillis
Known Participant
March 7, 2013
Question

Alt-Print Screen Function

  • March 7, 2013
  • 1 reply
  • 616 views

I would like to have my print function take a alt-printscreen of my drawing so I can capture all of the pop-up windows in my printjob, but I haven't been able to find anything online about how to do this. I'm using Air so I should all of the system access.

Here's an example of when I do an alt-printscreen. It capture the main file and all of the pop-up windows. I just need Air to take an alt-printscreen like this and print based on it.

Thanks!

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
March 7, 2013

if you can find the executable you can use air to execute it using the nativeprocess class:

var process:NativeProcess = new NativeProcess();

var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();

var file:File = File.applicationDirectory;

file = file.resolvePath("NativeApps");

file = file.resolvePath("C:\\WINDOWS\\system32\\cmd.exe");

if (NativeProcess.isSupported) {

    f();

} else {

    trace("error");

}

function f():void {

    nativeProcessStartupInfo.executable=file;

    process.start(nativeProcessStartupInfo);

Coreydwillis
Known Participant
March 7, 2013

What do I do once I've executed it though? Nothing happens when I try to print.

kglad
Community Expert
Community Expert
March 7, 2013

check the nativeprocess class.  there are properties, methods and events you can use to debug your app.