Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 87561

sendkeys to PS via .js script

$
0
0

Hello,

 

I want to call a recorded action thru a custom panel button (the action to call is a plugin-function, which I cant access thru the panel configurator) .So I assigned shortcut-keys for this action and these should be send to PS thru a .js script.

 

This is my code for testing:

 

var WshShell = WScript.CreateObject("WScript.Shell");

WshShell.AppActivate("PS");

WScript.Sleep(300);

WshShell.SendKeys("{F1}");

 

When I run the script with cscript.exe (WINDOWS 8), then the PS Window gets activated, but apparently no "F1" Key is sent, because no new window opens.

 

Can you help me, please?


Viewing all articles
Browse latest Browse all 87561

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>