Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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);
Copy link to clipboard
Copied
What do I do once I've executed it though? Nothing happens when I try to print.
Copy link to clipboard
Copied
check the nativeprocess class. there are properties, methods and events you can use to debug your app.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more