Home Download Buy Blog Forum Support

How to run a external process ?

How to run a external process ?

Postby fusionBin on Wed Jul 04, 2012 4:01 am

Hi,
Anybody know how to use the exec command ? Tell me how to use it please, thanks!
I want to preview my file with some program( use the exec command ), but there is no detail document explanation.
fusionBin
 
Posts: 1
Joined: Sat Jun 30, 2012 6:51 am

Re: How to run a external process ?

Postby agibsonsw on Fri Jul 06, 2012 10:30 pm

I've been digging a little and I believe the exec command is run as a key-binding like this:

Code: Select all
{ "keys": ["ctrl+shift+y"], "command": "exec", "args": {"cmd": ["C:\\windows\\system32\\notepad.exe", "$file"]} }

But it doesn't seem to parse $file (or $file_path or $file_name).

So, alternatively, try creating a Build like this (Tools menu, Build System, New Build System..)

Code: Select all
{
    "cmd": ["C:\\Users\\Andrew\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe", "$file"]
}

and just change the first part to refer to the app you want to use. (This example is for Windows). But someone might contribute with more precise info ;)
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm


Return to Plugin Development

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests