# Command button isn't working

**URL:** <https://discourse.mapeditor.org/t/command-button-isnt-working/2822>\
**Category:** Questions\
**Created:** [November 11, 2017, 9:56pm UTC](https://discourse.mapeditor.org/t/command-button-isnt-working/2822 "2017-11-11T21:56:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fpdotmonkey](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/fpdotmonkey/32/1525_2.png) [@fpdotmonkey](https://discourse.mapeditor.org/u/fpdotmonkey)\
**Post date:** [November 11, 2017, 9:56pm UTC](https://discourse.mapeditor.org/t/command-button-isnt-working/2822/1 "2017-11-11T21:56:09Z")

</div>

Hello,

I’m trying to export my project to Unity using Tiled2Unity. I put in this command, and I get an error, “The command failed to start.”:

`open -a "/Applications/Tiled2UnityMac.app" --args %mapfile`

I thought maybe the error was maybe due to a typo, but these commands yielded the same result:

`open %mapfile`

`/Applications/TextEdit.app/Contents/MacOS/TextEdit %mapfile`

`echo "Hello World"`

Hopefully I’m posting this in the right place. I saw [this](http://discourse.mapeditor.org/t/using-the-command-button/346) post, but none of the stuff there seemed to help.

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [November 11, 2017, 10:26pm UTC](https://discourse.mapeditor.org/t/command-button-isnt-working/2822/2 "2017-11-11T22:26:36Z")

</div>

Which Tiled version? I just tried with the latest development snapshot and couldn’t reproduce the issue. Some notes:

> [@fpdotmonkey](#):
>
> open %mapfile

This would not do anything because it would try to open the current file in Tiled, and Tiled just detects that it’s already open and the “current file”.

> [@fpdotmonkey](#):
>
> /Applications/TextEdit.app/Contents/MacOS/TextEdit %mapfile

For me, this started TextEdit, but then TextEdit complained that it didn’t have permission to open the file. No idea why, because the `open -t %mapfile` could open the map fine in a text editor.

> [@fpdotmonkey](#):
>
> echo “Hello World”

This command won’t be visible unless you right-click the entry and choose “Execute in Terminal” (or you open the Debug Console window, which can show the command output in the development snapshot version).

---

<div class="post-metadata">

**Author:** ![fpdotmonkey](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/fpdotmonkey/32/1525_2.png) [@fpdotmonkey](https://discourse.mapeditor.org/u/fpdotmonkey)\
**Post date:** [November 11, 2017, 10:54pm UTC](https://discourse.mapeditor.org/t/command-button-isnt-working/2822/3 "2017-11-11T22:54:51Z")

</div>

I’m running Tiled 1.0.3 on macOS 10.13.1

> [@bjorn](#):
>
> For me, this started TextEdit, but then TextEdit complained that it didn’t have permission to open the file

I tried to replicate what you got, but running `/Applications/TextEdit.app/Contents/MacOS/TextEdit %mapfile` through Tiled gave me the same error. Running `/Applications/TextEdit.app/Contents/MacOS/TextEdit path\to\mapfile` through the system prompt led to the `.tmx` opening in TextEdit with no issue.

> [@bjorn](#):
>
> This command won’t be visible unless you right-click the entry and choose “Execute in Terminal”

I’ve just tried this, but nothing pops up in the debug console, and I still get the error message “The command failed to start.”

Is it possible there are compatibility issues with the 9 November 2017 macOS update?
