Community Forums Archive

Go Back

Subject:Keyboard macros using scripting
Posted by: CharlesK
Date:11/1/2010 10:47:10 AM

There was a post a while back where a user asked if scripts could be used to play back keystrokes. The reply was:

"If you just want to record keystrokes and play them back. I recommend that you do that.

http://www.autohotkey.com/ Is an open-source program for keyboard
recoding and playback for windows. I'm sure that there are others out there as well.

Scripting is more about automating things that can't be turned in a sequence of keystrokes, where choices have to be made. "

I have made some macros using HotKeyz and they do work in Sound Forge Pro 10. However, I can't assign these macros to a Sound Forge toolbar icon. If, however, the macro was actually a Sound Forge script, then it could be assigned to a toolbar icon.

What I would like to see is one script that presses, say, the Delete key on the keyboard. This would get me started in making my own script macros.

Thanks!

Charles


Subject:RE: Keyboard macros using scripting
Reply by: roblesinge
Date:11/1/2010 1:22:00 PM

If you're only concerned with being able to macro keystrokes and such. I used a gamepad as a work-around. I've used a Belkin Nostromo N52 gaming pad which comes with software that lets you program individual keystrokes and macros for any program on your computer. I setup the keys to allow me to quickly play/stop, copy, paste to new, open up Graphic EQ, insert silence, etc.. It saves me a TON of repetitive keystrokes, since I use the same few operations over and over on each file I edit.

Rob

Subject:RE: Keyboard macros using scripting
Reply by: CharlesK
Date:11/1/2010 8:50:57 PM

That would work, but I don't want to buy this for five computers. Writing a script and assigning it to a toolbar icon would be, for me, a lot simpler.

Subject:RE: Keyboard macros using scripting
Reply by: roblesinge
Date:11/2/2010 5:44:28 AM

Oh, we went ahead and invested in 4 of them for our team. What exactly are you trying to shortcut? Almost anything in the Effects, Process and Tool menus has a toolbar icon you can add for it. I don't think it's as simple as just accessing keystrokes. You'd need to write scripts to perform the functions that the shortcuts access.

Rob

Subject:RE: Keyboard macros using scripting
Reply by: CharlesK
Date:11/2/2010 10:54:36 AM

The keystrokes DELETE PAGEUP PAGEUP SPACE. This deletes (cuts) a selection, backs the cursor up, then plays through the cut.

Subject:RE: Keyboard macros using scripting
Reply by: roblesinge
Date:11/2/2010 12:20:14 PM

To literally forward keystrokes to SF, you could use the ForwardKey property of ISfFileHost. It supposedly processes keystrokes as if the user had typed it.

Rob

Subject:RE: Keyboard macros using scripting
Reply by: CharlesK
Date:11/2/2010 1:54:51 PM

I am aware of ISfFileHost, but I have zero knowledge in creating a script. I'm sure I could modify a script once I have one. That's why a simple script to just send the DELETE keystroke to Sound Forge is all I need.

Go Back