Select to view content in your preferred language

Open NotePad

1240
6
Jump to solution
04-17-2013 09:27 AM
ShaningYu
Honored Contributor
I want to have a piece of code that can launch NotePad.  Is there a way to open it directly.
One way is to get my CPU's domain, then run
    var urlRequest:URLRequest = new URLRequest();
    urlRequest.url = "http://www.yourdomain.com/notepad.txt";
How to get my CPU's domain?  Thanks.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
omega_cancer
Frequent Contributor
My purpose is to have a clickboard function.  I loaded
   import flash.desktop.Clipboard;
   import flash.desktop.ClipboardFormats;
Then created
private var richTextEditor:mx.controls.RichTextEditor = new mx.controls.RichTextEditor();
The 3rd step is
     richTextEditor.text = txtX.text;
    System.setClipboard(richTextEditor.text);
The 4th step is paste the content on NotePad if it is open.
It works but I want to have NotePad open dynamically.
To open NotePad, I need
                          import flash.filesystem.File;
But I could not find the swc for the Flash.filesystem.File.
Thanks for your response.



As far as my knowledge is concened you can not run an .exe file from browser on client computer because browser do not have access to file system without users consent.
That is the reason you can not find Flash.filesystem.File classes. These classes are only available in AIR Desktop applications.
Try something else.

View solution in original post

0 Kudos
6 Replies
DougBrowning
MVP Esteemed Contributor
If i type this into Chrome it grabs the file and "downloads" it for me.  It may help you.

file:///C:/windows/system32/notepad.exe
0 Kudos
ShaningYu
Honored Contributor
It works in Window Explorer but not for any browser in my application.  However, you hinted me another way, namely, opening Window Explorer to open a file, to implement the task.  To do so, I need to find  flash.filesystem.File.swc.  Does anyone one know where it can be downloaded?  Thanks.
0 Kudos
GISDev1
Deactivated User
Can you explain your goal and workflow for something like this?

Executing a target .exe on the client's computer from a web browser is quite interesting.
0 Kudos
ShaningYu
Honored Contributor
My purpose is to have a clickboard function.  I loaded
   import flash.desktop.Clipboard;
   import flash.desktop.ClipboardFormats;
Then created
private var richTextEditor:mx.controls.RichTextEditor = new mx.controls.RichTextEditor();
The 3rd step is
     richTextEditor.text = txtX.text;
    System.setClipboard(richTextEditor.text);
The 4th step is paste the content on NotePad if it is open.
It works but I want to have NotePad open dynamically.
To open NotePad, I need
                          import flash.filesystem.File;
But I could not find the swc for the Flash.filesystem.File.
Thanks for your response.
0 Kudos
omega_cancer
Frequent Contributor
My purpose is to have a clickboard function.  I loaded
   import flash.desktop.Clipboard;
   import flash.desktop.ClipboardFormats;
Then created
private var richTextEditor:mx.controls.RichTextEditor = new mx.controls.RichTextEditor();
The 3rd step is
     richTextEditor.text = txtX.text;
    System.setClipboard(richTextEditor.text);
The 4th step is paste the content on NotePad if it is open.
It works but I want to have NotePad open dynamically.
To open NotePad, I need
                          import flash.filesystem.File;
But I could not find the swc for the Flash.filesystem.File.
Thanks for your response.



As far as my knowledge is concened you can not run an .exe file from browser on client computer because browser do not have access to file system without users consent.
That is the reason you can not find Flash.filesystem.File classes. These classes are only available in AIR Desktop applications.
Try something else.
0 Kudos
ShaningYu
Honored Contributor
It makes sense.  Thanks.
0 Kudos