Application-specific commands

Today’s “post of the day” is regarding custom commands/scripts I have written in XML.

As Chuck knows, I have written quite a few commands for applications such as Dreamweaver, Freehand, Photoshop, and more. I have managed to get my head around creating global versus application-specific commands, thanks to his advice. My Dreamweaver, Freehand, and some other application-specific commands work excellent.

My problem is that the commands I have written for Photoshop and Illustrator are not working properly. For example, I have a command in Photoshop called “PasteNew”.













If I utter the command in Photoshop, I can see that it gets recognized as such. If I utter the command in a different program, it usually gets recognized that something like “Paste 1”. Therefore, I can tell that the application-specific part is working properly.

When uttered, instead of executing the command, it is almost like it sends the text “PasteNew” instead. I am familiar with this behavior because that is exactly what happens when KnowBrainer takes its “digital coffee break” and forgets where it is. And yes, the same thing happens if I make it a global command.

Please help!

Chris,

First, keep in mind that the commands that are accessible in Voice Scripting in VoicePower are based on *.Net (Microsoft.Net Framework). You might want to take a look there while you're waiting.

Second, have you tried SendSystemKeys vs. SendKeys?

Lastly, just wanted to let you know that I have read this and am looking into it.

Chuck,

I’m not sure what I should be looking for in the .NET Framework.

Is the syntax the same for the SendSystemKeys and SendKeys? I tried the example below and ended up with the same result as the one above.













Is there any process that needs to be followed when updating the commands in a file? For example, do I have to toggle the microphone OFF/ON, restart VoicePower, or something?

Thanks for looking into it for me.
Chris

onebigfish2010-09-17 09:51:46

Chris,

Still looking into this. However, one of the things that you can try doing is searching the web for Visual Studio .NET commands. Evan wrote the capability using Visual Studio *.NET.

Back you with more as soon as I hear back from Evan.

It’s a little beyond me. I’m not sure what I would look for. I can ask one of our programmers. I believe we have Visual Studio at work.

Chuck, any more word on this?

Chris,

There are a number of things that are going on behind the scenes at present, including the fact that Evan is in the process of, but I don’t know how far along or when he will finish it, of writing some documentation for Voice Scripting. Also, one of the things down the road is going to an entirely new and different, and more user-friendly, scripting language. Again, there is no projection on either of these at the present.

At this particular point in time our main concern is the da Vinci awards, which are occurring this weekend and at which Evan is going to represent VoicePower. So, nothing is going to happen at least until next week sometime.

I’m running into the same problem with your script as you are, and, as I am able, I’m trying to work it through to try and see what is happening and why. Can you give me a step-by-step description of what you are trying to accomplish specifically, in what application, and what the outcome should be. Right now it’s the latter “what the outcome should be” that I’m having difficulty with. I can’t visualize and I need your help on that.

Even I am up to my butt in alligators with things that I have to do with clients.

I may be able to offer you an alternative once I can visualize what the outcome should be.

Good luck with the da Vinci awards!


As for a step-by-step of the above script, here goes…





Open the “New” dialogue.
Wait for the dialog to display.
Press Enter to accept the default settings.
Wait for the dialogue to close and the new file workspace to display.
Paste the contents of the clipboard into the new file workspace.




Here are a couple other examples.




Open the Image Size dialogue.






Open the Canvas Size dialogue.





Chris,

Am I correct in assuming that these are basically Adobe Photoshop and/or Illustrator?

If I get some time today I’ll try digging a little deeper into it. However, please let me know if my assumption is correct.

Chuck, they are all Photoshop CS2. I have the same problem with Illustrator. The commands are recognized properly according to the recognition box, but are sent as text strings.

Chris,

I have Photoshop CS4, but I’ll try to apply it to that and see what happens. My suspicion is that it has to do, at least to some degree, with the SendKeys commands.

I’ll stay on top of it is much as I can. I may not be able to go full tilt on it till the weekend, but will give it a shot and let you know.

I believe I had the same problem with that on Photoshop CS5 when I was using the trial.

Thanks for looking into it. I’d really like to move over my commands from KnowBrainer. I find that the VoicePower ones execute much quicker and more reliably, at least in the programs I can get them to work with. Wink


Hi Chris,

Haven't been able to identify the problem. Your syntax is correct. (Will keep trying to figure this out.)

You could try our vp-script commands which has a sendkeys mode=”sync” syntax that should prevent the commands being sent as strings. (You can mix legacy and vp script commands.)

BTW, I find that it makes it easier to proofread and troubleshoot commands if I put them in long lists rather than as single commands.

As soon as I have time in a couple of weeks, I'll be glad to help you create more Photoshop and Illustrator commands.


-
-
- <![CDATA[
]]>

-



-
-


outlookshorcutkeys1
-
^1Change to Mail
^2Change to Calendar
^3Change to Contacts
^+FUse Advanced Find
^+PCreate new Search Folder
{F4}Search for text
^HFind and replace text


Hi Ron,

When I use the VP script command in Illustrator or Photoshop the text does not get sent as a string, but nothing happens. The command is recognized still.

I am a little unsure how to use lists.


Chris
onebigfish2010-10-04 08:15:16

Chris,


Send me your xml files (to info@voiceteach.com ). I’ll see if I can figure this out. And, I’ll give you some examples of list commands.


Chris,


Send some of your xml files (to info@voiceteach.com ). I’ll see if I can figure this out. And, I’ll give you some examples of list commands.

I have sent some for you. Thanks very much.

Chuck, I hate to be a pest, but did you receive my last e-mail with your response to my questions?

Thanks,
Chris

Sorry to be bothersome, but can I please get an update on this?

Chris,

I apologize profusely, we have been looking at these but are still scratching our heads. Either Ron or myself will try to get to these this week and see if we can’t figure it out. We have discovered certain things, but we don’t know yet whether any of these will resolve or whether some of the things that we have found are triggering the problems that you’re experiencing.

I will try to get back to you ASAP.