Workspace “commands” howto

The new Workspace panel introduced a new set of features.
One of them is the new “execute command”, which is rather different from the “user toolset” of the SEPY main menu.
Once you’ve created a new command, using “add->New Command” contextual menu within the workspace panel you will see a dialog like this (click to enlarge image):

command prompt

How it works:

- name : how this item will be shown in the project tree
- command: the shell command name wich sepy will invoke (usually an .exe of .bat program)
- arguments: which arguments to be passed to the command
- start in: before invoking that command, sepy will change the current directory to the one given here (usually the same folder of the .exe file)
- run in: where display the command results (current document, new console, no console)
NB: Both “arguments” and “start in” textfields accept special arguments:

%(P)s: Directory path of the active project
%(p)s: Path of the active project
%(F)s: Directory Path of the active document
%(f)s: Path of the active document
%(ask:NAME:DEFAULT): Prompt before running command

Added in RC20:
%(ask:NAME:BROWSE_FILE): Prompt a file browse when command is run
%(ask:NAME:BROWSE_DIR): Prompt a directory browse when command is run

The last special argument is particular useful when you need to pass different arguments every time you want to run that command. In fact you will be prompted to insert the arguments before the command will be executed.
An example of what you will see, after defining in the argument field a string like this:

-V %(ask:extra arguments:simple) “%(ask:source:BROWSE_FILE)” “%(ask:destination:BROWSE_FILE)”

command_ask1.gif

P.S. I’ve also put together a couple of real life examples on how to use the new run command.
1. Run from the workspace panel: http://www.sephiroth.it/_temp/captivate/as2api/
2. Run from the user tools: http://www.sephiroth.it/_temp/captivate/swfmill/

3 Responses to “Workspace “commands” howto”

  1. Dorian Says:

    Hi,

    I’m confused about the new workspace features: What’s the difference between the .sxml workspace files and the .sws files? I can only make the worspace panel visible when I doublclick an old .sxml file. But under File/Workspace I can only save .sws files…

    Thanks for your support!

    Dorian

  2. Torbjørn Caspersen Says:

    I have problems accessing dos commands with this. I want to make a command that copies a file from workspace to a predefined folder, but can’t find a way to get COPY to run.

  3. IanLiu Says:

    I am having problems when running the Flex Compiler. The prompt window closes and i cant see the output. Is there a paramter to do not close it?

    Thanks,
    Ian Liu.