sending command and obtaining a reply from actionscript 3 / air - actionscript-3

I am attempting to send a command to the command line with an air/as3 application.
I have seen some documentation on the invoke command but i am wondering if anyone else has dealt with the same set of circumstances.
basically the user will be checking boxes and filling out a form which will then be written as arguments to an application that will be doing the work. this application accepts these arguments as well as a place to store the output file and processes the file.
so is it possible to send commands to the command line using as3/air and furthermore is it possible to obtain the resulting message from the command line.
I have searched a bit for this sort of information but it seems that google returns a lot of 'how to compile as3 from the command line' tutorials and there are very few articles concerning air/as3 and it's possible interactions with the system's command line.
Thank you in advance,
-Nathan

there is no way to launch apps from AIR (explanation here), nor to send anything to the command line ... however mike chambers created CommandProxy that allows you to do so, interfacing with a C# counterpart ...
greetz
back2dos

AIR 2.0 has Native Process API. Through which now its possible.

Related

Upload file to HTML input type='file' that does not belong to a form

I am attempting to upload a file via curl that basically should imitate how a user would upload a file to https://lutzroeder.github.io/netron/
I can see there is a:
<input type="file" id="open-file-dialog" style="display:none" multiple="false" accept=".onnx, .pb, .meta, .tflite, .lite, .tfl, .bin, .keras, .h5, .hd5, .hdf5, .json, .model, .mar, .params, .param, .armnn, .mnn, .ncnn, .dnn, .cmf, .mlmodel, .caffemodel, .pbtxt, .prototxt, .pkl, .pt, .pth, .t7, .joblib, .cfg, .xml">
But the input does not belong to any forms - which I haven't seen before. When I try doing a traditional post like:
curl -X POST -F ‘data=#example.h5’ https://lutzroeder.github.io/netron/
It is not permitted. How should I approach uploading a file to that input programmatically? I am trying to automate the creation of these Netron figures, as having to manually select e.g. 100 files to get 100 figures would be very cumbersome
Thanks!
Judging by your comment and others', the HTML issue is probably 1. not feasible; 2. not going to completely solve your goal of automating the creation of figures anyway (fill in the input is only the first step, you still need to automate the export process right?)
Therefore I suggest that the easiest solution is to run your own instance of Netron viewer. Netron is an open-source project, and there are many ways to run it on your own computer as given in its documentation.
The approach you are looking at is to utilise the browser version hosted on github.io. The documentation gives all sorts of other ways to run the viewer, macOS/Linux/Windows/Python Server pick one that's most suitable for your situation (depending on your OS and experience in programming) and then write a wrapper script (or hack the initialisation process since you have the source code) to feed the viewer with files and collect outputs.

"/usr/bin/google-chrome" is not an ELF file

I am going to use ltrace for some applications like chrome but when I use it, I receive the following error message.
"/usr/bin/google-chrome" is not an ELF file
Does anybody know about the solution? I want to know what functions are exactly called by running an application.
Thanks,
Does anybody know about the solution?
file -L /usr/bin/google-chrome
/usr/bin/google-chrome: Bourne-Again shell script, ASCII text executable
This tells you that google-chrome is a shell script. If you look inside, you'll see that it eventually invokes a real ELF binary (/opt/google/chrome/chrome on my system).
I want to know what functions are exactly called by running an application.
The ltrace command will not show you that. It will only show you what external functions are getting called.

First time coding and confused - Echo

Apologies for incredible ignorance. First time ever looking at or trying coding in any form and all naturally a bit confusing and overwhelming.
Trying to keep it super basic I'm attempting to build something basic for Amazon Echo by working through this article - https://developer.amazon.com/blogs/post/Tx3DVGG0K0TPUGQ/updated-alexa-skills-kit-fact-template-step-by-step-guide-to-build-a-fact-skill
Have got to Step 2.3
Once you have the source downloaded [done], node installed and npm updated, you are ready to install the ASK-SDK. Install this in the same directory as your src/index.js file for your skill. Change the directory to the src directory of your skill, and then in the command line, type: npm install --save alexa-sdk
I've moved the SDK into the same folder as the source - in downloads folder. Am confused on changing the directory to the same as my skill. As far as I know there is no skill yet so not sure where to move it to.
When type in npm install --save alexa-sdk
returns
npm WARN enoent ENOENT: no such file or directory, open '/Users/OwenLee/package.json'
npm WARN OwenLee No description
npm WARN OwenLee No repository field.
npm WARN OwenLee No README data
npm WARN OwenLee No license field.
working on a mac so don't really know how/where to access this, but assuming this is where i need to move the files to?
Very sorry for baby-basic knowledge. Just trying to at least get a foot in the door as know need to learn this stuff but everything i read seems to assume i already have a working knowledge of coding : S
any help would be awesome - inc. any advice on steps after that you can probably see i'll trip up on
thanks!!
oven121
So as far as the directory /Users/OwenLee/ this would be your home folder on a Mac. The Root / of your HDD can be reached through Finder by clicking on Macintosh HD (or whatever you named your main hard drive) in the side bar. If you open up a new Terminal window it will be the directory that the terminal starts in. You should be able to fix your problem by taking the file packages.json, which should be wherever you downloaded the SDK to, and placing it in your home folder, then re-running the command.
Now don't let me change your mind if you're truly committed, but if you have absolutely no experience with programming I would recommend starting with something a bit simpler than Java or Javascript. Object oriented languages can be both very convoluted and difficult to get the hang of for beginners (I personally have been writing native languages like C for years and am just now starting to understand how Java works.).
If it is an option I recommend starting with a language that your Mac has built in support for. Perhaps start with Bash scripting or Apple Script making basic scripts to do things you find tedious to do manually in a terminal, or get to know the basics of processor-native languages like C & C++ by making some basic programmes to display text when it is run, or to ask the user to type something, and say back what they typed. Finally since you are on a Mac you can get Xcode for free in the app store, it will configure itself and you could play around with it to learn how macOS handles windows, perhaps start by making a basic programme window with a few buttons that do different things when clicked.
If you have any interest in my suggestions you can find some info about bash scripting here: https://linuxconfig.org/bash-scripting-tutorial the tutorial says it assumes the reader has no previous knowledge of Bash, and most commands should work fine in the version of Bash built into your Mac's Terminal app.
If you take more interest in C++ this is the site that I used to learn to write it, and learn how native languages work: http://www.cplusplus.com/doc/tutorial/
Finally here is a basic C++ programme called "Hello World", it is somewhat of an initiation rite of C/C++ students to write this programme and learn how each part of it works:
//HelloWorld.cpp the double slash tells the compiler and user that everything after it on this line is a comment, not code//
#include <iostream> //The octothorp '#' lets the compiler know it needs to use the library named inside the pointed brackets '</>' when it builds the programme. 'iostream' stands for In-Out Stream, and handles basic text, and basic processor commands//
using namespace std; //This line tells the compiler that any line that says to show text or ask the user to type something should use regular text and not a special format//
int main() //'int' stands for integer, any time you make a variable that contains only an integer you should put this in front of it's name, and 'main' is the name of the integer. The empty parentheses tells the compiler that this is a function, rather than a number//
{ //The open curly bracket '{' tells the compiler where the function starts
cout<<"Hello World"; //'cout' stands for 'character out' and is for showing basic text in the terminal window. The double pointy 'out' brackets '<<' tells the compiler that the text should be sent out of the programme rather than loaded into a variable, the text inside the quotes is what will be shown on the screen, and the semi colon tells the compiler where the command ends, it has to be put at the end of any command that is inside of a function//
return 0 //The command 'return' is for telling the compiler whether or not an error has occurred, 0 means the programme ran fine, 1 means something went wrong, either way the programme closes when it runs the command 'return'//
} //the closed curly bracket tells the compiler where the function ends//
Good luck with your programming, and if you have any questions unrelated to this thread please feel free to private message me, or create a new question and tag me in it so that I get notified.

Building Windows Store app programmatically

We have a requirement of creating several Windows 8 apps for tablets. There is a common solution and news apps are created by passing different resource to the same code.
For Mobile it was a cakewalk - Used the Microsoft.Build.Evaluation.Project class to get the xap file.
But for Surface, building from code does not give the direct appx output, while building using MSBuild gives appx as the output.
I tried several methods to avoid calling MSBuild from C#(by creating a Command Process) like creating a zip file - myapp.appx - and then signing it using this c++ code. It didn't workout because of an extern reference and I gave up.
Then I tried to use SignTool.exe by creating a Command Process in C#. That too failed.
So, I am wondering if there is any way to build an appx directly from C# without MSBuild.
The reason why I am trying to avoid MSBuild is to get a status from the build process, which Microsoft.Build.Evaluation.Project.Build() provides.
First try adding a pfx key to your project and then try the build via Microsoft.Build.Evaluation.Project.Build() again. The pfx is required from what I read:
See Candy's answer here:
MSBuild target to create the .appx package
So then the trick would be to use SignTool to get the pfx in the first place and update the project with that pfx, but first see if the above works.

Access 2000 - Editor & Line numbers?

Anyway to get Access 2K Module (vba code) editor to show line numbers?
one of my favorite questions! .... please use MZ-Tools for that, and do not hesitate to send them some money! You can even use their tool to build a smart error handler, as proposed here