Skip to main content
Participant
July 24, 2009
Question

Executing a menu command from a script

  • July 24, 2009
  • 1 reply
  • 2015 views

Hi,

I'm still not very familiar with the PS CS4 object model and I'm wondering whether I can trigger the execution of a menu command from a script.

My purpose is to fix the CS4 issue with some plugins that have a bug causing some elements of the PS CS4 interface (like the Arrange Documents drop down menu) to appear blank when hovered with the mouse. This problem usually disappears when launching these plugins. For example, you'll have the problem when installing Nik Software's Silver Efex (they promised to fix this in February but we're still waiting). Launching "File | Automate | Nik Selective Tool" and then closing the dialog fixes the issue... until you re-launch PS.

So I want to do that automatically when PS starts. I tried with an action which I attached to the startup event but the action is not launched (probably because the plugin is not active yet). So I tried the scripting way but I don't see how I can launch a menu command automatically.

Thanks in advance.

--

Patrick

This topic has been closed for replies.

1 reply

Inspiring
July 24, 2009

In CS4 there is a runMenuItem method but I don't know if it works with plugins. And I would think that if the action is not working in the startup event because the plugin is not yet loaded a script would have the same problem as it would be run at the same point in the startup.

Are you sure the reason for not working is the plugin is not loaded? Have you tried a different action that does not need a plugin to see if you are setting the event correctly?

MainSoftAuthor
Participant
July 24, 2009

Hi Michael,

Thanks.

Yes, I'm setting the event correctly. I checked this. There's not much room for a mistake anyway. You enable events to run scripts and action, you select the event, you select the action, click on Add and voilà.

--

Patrick

Inspiring
July 24, 2009

The reason I asked is most filters need an open document. I thought the reason it was not working could be that there in no image to filter at startup.

But as I said I don't have nik plugins so I could be wrong.