[PD] Newbie request

Hugh Sung hughsung at gmail.com
Sat May 10 05:43:15 CEST 2008


Ok...please bear with me, as i continue to slowly get familiar with learning
PD!
I've managed to get a working start, using a sendkey VB script graciously
written up by someone from the PD forum.  Using bonk~ and moses~, i'm able
to split incoming audio to loud and soft levels, which then send commands to
open two separate versions of the sendkey vb script - one to type a key for
loud, the other to type something different for the soft sound input.
Problem is that the script seems a bit slow - there's a noticeable delay
when sending signals from PD to the VB script then to the final program
receiving the text strings.  i'm hoping to get speedier results either going
the sendOSC route, or by using one of Patrice Colet's external scripts.  i'm
including a link to the zipped copy of my PD project from the PD forum:
http://puredata.hurleur.com/viewtopic.php?pid=7514#p7514


So here is my new round of still-newbie questions:

1.  How do i install and use the external scripts winkey and/or kbdstroke?
Or do i need to just call those externals from within pd somehow?
2.  I'm trying to emulate Dan Wilcox's (aka: robotcowboy's) sendOSC method-
i seem to be able to connect to the OSC port, but i don't know how to
activate the 'sendkeys' script.  I get a 'no method for 'bang'' error when i
try to test with a straight message bang:

sendOSC: connected to port localhost:9001 (hSock=11213640) protocol = UDP
> error: sendOSC: no method for 'bang'


Can someone hold my hand and show me how to call 'sendkeys' from within PD
to send strings/text to another application?  i'm hoping this method will be
faster than the VB script method...

i'm really sorry for hogging up the PD-list with this - i'm getting so close
now!  Thanks ever so much for all your collective help!

Hugh

On Thu, May 8, 2008 at 6:02 PM, Patrice Colet <pat at mamalala.org> wrote:

> Patrice Colet a écrit :
>
>>  Hi I've developped this external for windows last year, this emulate
>> keystrokes, the result of ascii code depends on your hardware, it uses
>> kbd_event API, but I believe the python script from previous messages that
>> uses sendkey would be much better.
>>
>>  For example ou will have to use messages like this:
>>
>> [downkey 18, key 9, key 9, upkey 18( to emulate alt+tab+tab combination, .
>>
>>  Use it at your own risk, good luck.
>>
>
> ooops, I wanted to say "the result of the string sent to the object depends
> on the hardware"
>
>  and not "the result of ascii code depends on your hardware".
>
>  also if you click on the message that emulate keystroke, the focused
> window will still be the pd patch because it focuses on mouse release, also
> the object doesn't seem to work if we use [key] for triggering the message,
> so I put a delay between the bang and the message, then the message is sent
> after the mouse click is released.
>
> an example is attached
>
> thankyou
>



-- 
Hugh Sung
www.hughsung.com
www.TabletPCMusician.com
www.musicmeetstech.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20080509/6e22e198/attachment.htm>


More information about the Pd-list mailing list