Selecting Free Transform

Does anyone know how to select the Free Transform tool found under
Edit - Free Transform in Photoshop.

It appears that this is one of those options not recorded by Alchemist

Please try the follwing:

function menuCommand(id) {
    require('photoshop').core.performMenuCommand({
      commandID: id,
      kcanDispatchWhileModal: true,
      _isCommand: false
    });
}

and then call it like:

menuCommand(2207);

Thank You,
Did you use Alchemist in inspector mode to get the Menu id number

no i used the listener and disabled the filter. So it shows the menuid/commandID…

Something else I have learnt :slight_smile:

Would be nice if you formatted your code properly with backticks

```
codeGoesHere();
```
1 Like

Just want to pass an update to the above code supplied by @assitburn
What I have noticed is that the menu id for other menu item do dnot appear to be the same across platforms.

I was going to use the above code for fetching the Gaussian Blur Dialog but found that the id on Mac was -356 which was different to the id on Windows which was -374

Can anyone think of a workaround

This will return “darwin” for Mac and “win32” for windows.

var osVersion = require('os').platform();

Why win32… don’t know??? But that is just what it does. You can use an if/then statement to set the command ID depending on the OS.

However, the fact that the command IDs are different makes me wonder how dynamic they are and if the IDs change now and then between PS versions too. This is the first I have heard of using the menuCommand function and I can see how this could be really handy.

I think I saw somewhere posted, that negative command IDs may change on every Ps restart. Usually these are assigned to plugins commands. You should find command ID you need from the panelList. Read through this topic - might be useful