Hey all,
I have an extension created using Creative Suite Extension Builder. Once the plugin is installed it shows up in the Windows > Extensions menu.
Previously, I would open up the Keyboard Shortcuts menu in Photoshop (Edit > Keyboard Shortcuts), and assign a shortcut to my menu item. The problem is that anything under the Extensions menu doesn't show up in the Keyboard Shortcuts dialog.
I was thinking I could ship a script with the Plugin, that would show up under File > Scripts. The script would simply activate the Extension Panel. I could then assign a Keyboard Shortcut to the script.
I haven't been able to find anyway to "activate" an extension panel via script. ScriptListener doesn't show anything when clicking into a panel. I've been messing around with CharID "ExtQ" and "Extn" with no success. I've also been looking at runMenuItem(), but haven't figured out how to get the ID of the menu item I'm trying to execute.
Am I over thinking this? Any advice?
Thanks in advance for any help!
Activate panel using keyboard shortcut
-
Paul MR
Activate panel using keyboard shortcut
Not sure how you will apply this as when you install a panel Photoshop will need to be re-started to pick up the new panel.
To start the new panel you could use...
Code: Select allopenPanel("Test");
function openPanel(Name) {
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putName( charIDToTypeID('Mn '), Name);
desc1.putReference( charIDToTypeID('null'), ref1 );
try{
executeAction( charIDToTypeID('slct'), desc1, DialogModes.NO );
}catch(e){}
};
To start the new panel you could use...
Code: Select allopenPanel("Test");
function openPanel(Name) {
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putName( charIDToTypeID('Mn '), Name);
desc1.putReference( charIDToTypeID('null'), ref1 );
try{
executeAction( charIDToTypeID('slct'), desc1, DialogModes.NO );
}catch(e){}
};
-
knaught
Activate panel using keyboard shortcut
You sir are a genius! I owe you a huge high-five.
When the ZXP extension installs, it automatically places the script in the scripts folder. Then I can set a keyboard shortcut for the script in the File > Scripts menu. Photoshop Extension Manager prompts the user to restart Photoshop after an installation if it was open.
Cheers!
When the ZXP extension installs, it automatically places the script in the scripts folder. Then I can set a keyboard shortcut for the script in the File > Scripts menu. Photoshop Extension Manager prompts the user to restart Photoshop after an installation if it was open.
Cheers!
-
todd098
Activate panel using keyboard shortcut
Digging this thread back up as it helped me get halfway to solving a problem.
I have assigned keyboard shortcuts in my panel and they work great when the panel is selected. I used the code mentioned above to make a script that will open the panel and make it active. Then, the user can use the panel specific keyboard shortcuts.
What I want to do is complete this action in one keyboard shortcut instead of two. I was thinking of making a script that opened the panel (like the example above) and then sent instructions to the panel (ex: run function x). Or open the panel and simulate a keyboard shortcut.
Any suggestions on how to do this or another way to use a single keyboard shortcut to run a function inside of a panel when the panel is not active?
Thanks
I have assigned keyboard shortcuts in my panel and they work great when the panel is selected. I used the code mentioned above to make a script that will open the panel and make it active. Then, the user can use the panel specific keyboard shortcuts.
What I want to do is complete this action in one keyboard shortcut instead of two. I was thinking of making a script that opened the panel (like the example above) and then sent instructions to the panel (ex: run function x). Or open the panel and simulate a keyboard shortcut.
Any suggestions on how to do this or another way to use a single keyboard shortcut to run a function inside of a panel when the panel is not active?
Thanks
-
c.buliarca
Activate panel using keyboard shortcut
when you used the script above did the panel got the focus? I know I've tried that without any success, but I am using the old free panel creation with the CSXSLibrary-2.0-sdk-3.4.swc... Maybe Adobe changed this on the Extension Builder...
The way I've ended doing this was in two steps as well, and to get the focus I've used a Python script to automatically click on the panel.
The way I've ended doing this was in two steps as well, and to get the focus I've used a Python script to automatically click on the panel.
-
knaught
Activate panel using keyboard shortcut
So after working on this for months and months and months. I finally verified with Adobe that the Panel does indeed receive focus from Photoshop. However, the Embedded Flash Player itself will not receive focus until the user has clicked into the panel.
Since Adobe is discontinuing the Adobe Embedded Flash Player this year in favor of the new Chromium Embedded Extensions, it will never be fixed. I have put in a request with the Photoshop team to allow us to pragmatically grant focus to a Chromium Plugin, and they said they were going to work on it.
Cheers,
Nate
Since Adobe is discontinuing the Adobe Embedded Flash Player this year in favor of the new Chromium Embedded Extensions, it will never be fixed. I have put in a request with the Photoshop team to allow us to pragmatically grant focus to a Chromium Plugin, and they said they were going to work on it.
Cheers,
Nate
-
c.buliarca
Activate panel using keyboard shortcut
That's great if they will do that, to bad it wasn't in flash as well...