Add support command line - objective-c

I developed a GUI application for macOS to record video from a computer screen. Can I add support command line? Example,
$myapp -start // Start recording video
$myapp -stop // Stop recording video
and etc.
If it's possible, then how can I implemented it?

It would probably make more sense to create a dedicated command-line tool, built by its own target, and include that as a "helper" executable in your application bundle.
You can then have your application install that as a command-line tool in /usr/local/bin/ by copying it, creating a hard link, etc. If it's a completed tool consider also installing a man page for it.

Related

Trying to create standalone Sikuli application

I want to be able to distribute my Sikuli script and allow the end user to run the script without installing Sikuli, my only problem at this point is not knowing what dependencies Sikuli needs to run (besides JAVA). With this knowledge I simply want to create a zip file for my user's machines that they can unzip into a folder and run the script.
Assuming you are using SikuliX as a command line script and not the IDE(IDE should probably work same way too. but I have not much experience with it) , you can simply copy the whole SikuliX folder to another PC and it will usually work straight away. As you mentioned yourself, the only requirement is Java.

LUA windows: How do I launch windows metro app with Unified Remote script

I'm trying to make a custom remote for unified remote server in windows 8.1
The sample scripts have os.start(command). It works for something like calc, but I'm trying to launch a metro app 'netflix://' and Lua doesn't seem to want to accept it - I think it's not taking the front slashes.
Is there a way to get Lua to launch a metro app in windows? Thanks
Assuming you mean os.execute() command, to run commands that open files and run based on protocol association, you need to use start command:
os.execute("start http://google.com")
If you need to put the parameter in quotes, then make sure to include a pair of empty quotes as the first parameter:
os.execute([[start "" "netflix://..."]])
For os.start(), it seems that you have to pass the whole path to a command. The Unified Remote API states that it should match installed applications, but I believe it might only be applicable to applications with binaries in the PATH, which is why their example of calc works.
With this in mind, and knowing that start works well directly from PoweShell, this command does what we need:
os.start("C:\\WINDOWS\\system32\\cmd.exe", "/c", "start", "netflix:");
Answering this old question since it's the top google hit when looking for launching windows10 apps with Lua for Unified Remote
As a side note, due to limitations on the Netflix Win10 app, I ended up simply opening Firefox and giving it the Netflix URL. Assuming default installation:
os.start("C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe", "https://www.netflix.com");

Trouble using ssh in a Mac Automator Service

I am trying to create an Automator Service that runs an applescript that eventually runs a bash script to ssh/scp to a server:
--
I have this applescript that saves my current photoshop document and calls a bash script to scp the image to a server. The bash script then runs ssh to do some stuff on said server with the image.
I have an ssh-askpass file and it seems to work well in most situations. I even tried reinstalling it to make sure I didn't goof on permissions, but it seems to be in good shape.
If I just run the applescript through Applescript Editor, it works fine and goes through ssh-askpass.
I want to create an Automator action (using the "service" template) to run my applescript, so I can just make it into a keyboard shortcut.
If I just run the script in Automator, everything works fine. Unfortunately, when I try to use the service outside automator (ie App Menu > Services), it seems that my Automator action is not attempting to go through ssh-askpass at all (which I verified with temporary logging)- everything works fine up to that point.
I looked into it a bit more, and it appears that a similar issue occurs when I try to run the applescript from the terminal (and not Applescript Editor)
--
Is there something different I need to do to ensure that an applescript (in Automator) uses ssh-askpass?
I found the issue. In the bash script I was calling, I was exporting the SSH_ASKPASS path, but not the display:
export DISPLAY=":0"
Apparently the AppleScript Editor (and XCode and Automator) does the exports for you, which is why it was working in those cases.
If you have control over your account on the server (e.g. shell account), I would just generate an SSH keypair and use it for authentication. That way, you can truly automate the exchange and not have to deal with ssh-askpass at all.
See http://paulkeck.com/ssh/ for a guide to making and deploying SSH keys.

How do I package an Adobe Air project in Aptana for the BlackBerry Playbook

I have developed a mostly HTML/CSS/jquery application in Aptana. Does anyone know the steps to take to convert this project to a .BAR file for use with the Blackberry Playbook simulator?
I'm guessing I need to package the project as an .airi file first, then use the Blackberry bbwp tool to compile? Has anyone had any experience with this process?
Thanks so much for any help.
This is a bit late I suspect but you have to download RIM's WebWorks package and follow all the necessary steps on their website. Basically, once you are as far as you are, you zip what you've got with a config.xml file and run their command line tool to turn it into a .bar file. Here's a little secret - a .bar file is actually just a .zip file by another name. If you change a .bar back to a .zip file you can treat it like any other zip file.
After you've done this, run the signing tool, (results and mileage may vary) and then push it out to the device with another command line tool. In the simulator you have to set it to "Development Mode" and get the IP address. You put the IP address into the command line tool and it will put it onto the device. You may have to restart the simulator for it to show up. If you can't get the signing tool to work you should still be able to put it onto the simulator.
Download WebWorks and get started here - http://us.blackberry.com/developers/browserdev/
You will need to sign up for a developer account to download it.

Windows CE Device: Deploy using a .zip or a .cab on headless device?

I have a Windows CE device that we are deploying, but we have complete control of the software installed on it.
This is not a typical Windows Mobile device, this is a headless device that the user will not interact with. I know that on PDA-style WinCE devices, the .cab file is the preferred application distribution method.
However, on a headless device, we will be writing some type of upgrade/patch server that will ping a server for updates, download them, and auto-install when they are available.
Do I still want a .cab file, or is a .zip (or even something else) better?
What are the requirements for a .cab file - what kind of restrictions / requirements might get in the way and be an annoyance? What are the benefits?
I'd stick with CAB as a package since even headless devices can use the CAB extraction tool. If you ZIP it, then you have to add a ZIP support library and app. CAB also has the ability to add registry entries and define far more disparate target locations than a zip (I want x.dll in \Windows but prog.exe in my program folder - try that with a ZIP).
One thing to keep in mind is that wceload (the CAB extractor) uses a UI by default, so you're going to want to use things like the /noui switch for it.
If you're true headless this may not be an issue (not done that in a long while) but a fairly common "headless" configuration has display support and either the display simply isn't hooked up or is something like a NOP VGAFLAT driver. This allows you to run a shell and have access to all the nice shell APIs, but adds to the challenge that GWES will render dialogs onto the non-existent display.
OpenNETCF also has a CAB Installer SDK that you can use to completely remove any UI with by creating your own installer app. This may or may not be useful depending on the how and when the install happens (through HKLM\Init or otehr for example).