playMaker

Author Topic: Command Line and Path Seeker Actions  (Read 1678 times)

Gaviathan

  • Playmaker Newbie
  • *
  • Posts: 5
Command Line and Path Seeker Actions
« on: January 28, 2016, 03:33:33 PM »
My coding skills are extremely limited but I used unity to make myself a little app that puts some tedious tasks into buttons. To do this I created 2 actions that I thought some others might find useful. Anyone who knows anything about code could probably do this much more efficiently but here they are anyway.

Command Line is an Action with a text area that you can put command line stuff in, it opens the command line and feeds it your commands.

Path Seeker also has a text area but this time you just put a path in and it will open it.eg. C:\Program Files (x86)\something\something.exe
 Useful if you know the path to a native file or if you use an installer and include the file in your build.

Enjoy :)

EDIT: If you want the path seeker action to work on your build regardless of where it is stored on your computer then Duplicate PathSeeker and rename it PathSeeker2, then delete

System.Diagnostics.Process.Start(stringValue.Value);

And replace it with

Application.OpenURL ((Application.dataPath) + stringValue.Value);

Then if for example you put a folder named MyFolder that contained MyFile.exe in the YourProject_Data folder you could put \MyFolder\MyFile.exe in the action's string box and it will find it regardless of where the project is stored. Stating the correct extension for the file is important. You will most likely have to build your project to test it out.
« Last Edit: February 01, 2016, 11:55:39 AM by Gaviathan »