Copy link to clipboard
Copied
i need simple as3 code that can open microsoft outlook. once i click the flash button it should navigate me to microsoft outlook .
note : i do not want to load microsoft out look in flash stage . rather once i click a button of .swf stage . then it will open microsoft out look of my windows 7
Any suggestion ?
thanks
...import flash.filesystem.File;
import flash.desktop.NativeProcess;
import flash.desktop.NativeProcessStartupInfo;
var process:NativeProcess = new NativeProcess();
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
var exe:File = new File();
exe.nativePath = "C:/Program Files/Microsoft Office/Office15/Outlook.exe";
nativeProcessStartupInfo.executable = exe;
var args:Vector.<String> = new Vector.<String>();
args.push('/sniff');
nativeProcessStartupInfo.arguments = args;
pr
Copy link to clipboard
Copied
Have you tried using a mailto link (URLRequest) such that the default browser opens?
I don't think there is any way you can target a specific application to open on someone's machine using AS3... that would be the equivalent of a nasty viral infestation if you could do that.
Copy link to clipboard
Copied
As long as you're running on AIR you can open anything you like.
Copy link to clipboard
Copied
import flash.filesystem.File;
import flash.desktop.NativeProcess;
import flash.desktop.NativeProcessStartupInfo;
var process:NativeProcess = new NativeProcess();
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
var exe:File = new File();
exe.nativePath = "C:/Program Files/Microsoft Office/Office15/Outlook.exe";
nativeProcessStartupInfo.executable = exe;
var args:Vector.<String> = new Vector.<String>();
args.push('/sniff');
nativeProcessStartupInfo.arguments = args;
process.addEventListener(NativeProcessExitEvent.EXIT, appClosed);
//start the process
process.start(nativeProcessStartupInfo);
function appClosed(e:NativeProcessExitEvent):void
{
process.removeEventListener(NativeProcessExitEvent.EXIT, appClosed);
trace("closed");
}
Here's a little code that will open Outlook on my machine. The args let you send command line switches, like /sniff which forces outlook to update meeting requests and such. You will need to publish to AIR and use the Extended Desktop profile.
Copy link to clipboard
Copied
sorry an error occured
The application cannot be installed due to a certificate problem. The certificate does not match the installed application certificate, does not support application upgrades, or is invalid. Please contact the application author.