Alex:

The answer was actually much simpler than I was trying to make it. Here is a 
code snippet which will run the default application for a particular file;

            var strFilePath:String = _objDownloadFile.nativePath;
            var file:File = File.applicationDirectory.resolvePath(strFilePath);
            file.openWithDefaultApplication()

Paul R. Stearns
Advanced Consulting Enterprises, Inc.

15280 NW 79th Ct.
Suite 250
Miami Lakes, Fl 33016

Voice: (305)623-0360 x107
Fax: (305)623-4588

----------------------------------------
From: Alex Harui <aha...@adobe.com.INVALID>
Sent: 6/20/20 2:53 AM
To: "pa...@compuace.com" <pa...@compuace.com>, "users@flex.apache.org" 
<users@flex.apache.org>
Subject: Re: migrating to AIR when using url "POST" request
This article implies that you can use “start” on windows. 
https://stackoverflow.com/questions/3729187/how-to-open-file-with-default-application-in-cmd.
 I think you can use “open” in OSX. There might be some simpler way that I 
don’t know.

-Alex

From: Paul Stearns <pa...@compuace.com>
Reply-To: "pa...@compuace.com" <pa...@compuace.com>
Date: Friday, June 19, 2020 at 5:35 AM
To: Alex Harui <aha...@adobe.com>, "users@flex.apache.org" 
<users@flex.apache.org>
Subject: Re: migrating to AIR when using url "POST" request

Alex:

Not really. I do not control the computers the app is installed on. If I could 
run an associated application that would work. In other words the equivalent of 
double clicking the file at the OS level.

Paul R. Stearns
Advanced Consulting Enterprises, Inc.

15280 NW 79th Ct.
Suite 250
Miami Lakes, Fl 33016

Voice: (305)623-0360 x107
Fax: (305)623-4588

________________________________
From: Alex Harui <aha...@adobe.com>
Sent: 6/19/20 12:57 AM
To: "users@flex.apache.org" <users@flex.apache.org>, "pa...@compuace.com" 
<pa...@compuace.com>
Subject: Re: migrating to AIR when using url "POST" request
Paul,

NativeProcess should let you launch the actual application if you know the path 
to the application.

Would that work for you?
-Alex

On 6/18/20, 5:40 AM, "Paul Stearns" <pa...@compuace.com.INVALID> wrote:

Alex:

My goal is to receive the file on the client and open Excel.

For the moment i did;

// navigateToURL(u, "_blank");
var objDownloadFile:FileReference = new FileReference;
objDownloadFile.download(u,strFileName + ".xlsx");

which will allow the user to download the file. It would be nice to give them 
the option to open it from the application.

Paul R. Stearns
Advanced Consulting Enterprises, Inc.

15280 NW 79th Ct.
Suite 250
Miami Lakes, Fl 33016

Voice: (305)623-0360 x107
Fax: (305)623-4588

----------------------------------------
From: Alex Harui <aha...@adobe.com.INVALID>
Sent: 6/18/20 12:04 AM
To: "users@flex.apache.org" <users@flex.apache.org>, "pa...@compuace.com" 
<pa...@compuace.com>
Subject: Re: migrating to AIR when using url "POST" request
At a higher-level, what is the user goal? Can you open Excel itself or does it 
have to be a browser window?

-Alex

On 6/17/20, 10:53 AM, "Paul Stearns" <pa...@compuace.com.INVALID> wrote:

In many places in our applications we use the navigateToURL method to load 
another browser window with Excel Spreadsheets and other items we generate from 
code on our website. We invariably use "POST" instead of "GET" for various 
reasons, some of which cannot be converted to "GET."

Where can I find information on how to convert;

var u:URLRequest = new URLRequest(_RootDomain + urlExcelExport);
u.data = variables;
u.method = "POST";

navigateToURL(u, "_blank");

to something which will work from AIR? Perhaps URLloader?

Paul R. Stearns
Advanced Consulting Enterprises, Inc.

15280 NW 79th Ct.
Suite 250
Miami Lakes, Fl 33016

Voice: (305)623-0360 x107
Fax: (305)623-4588


Reply via email to