[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

mouse block and key pressed simulation?

Bu Mihai

7/4/2007 7:29:00 AM

How can i block and release the mouse and keyboard and how can a
simulate a key pressed in ruby? (for exemple i want to press enter key)

--
Posted via http://www.ruby-....

6 Answers

John Joyce

7/4/2007 3:04:00 PM

0


On Jul 4, 2007, at 2:29 AM, mihai wrote:

> How can i block and release the mouse and keyboard and how can a
> simulate a key pressed in ruby? (for exemple i want to press enter
> key)
>
> --
> Posted via http://www.ruby-....
>

Depends ..

Bu Mihai

7/5/2007 6:40:00 AM

0

John Joyce wrote:
> On Jul 4, 2007, at 2:29 AM, mihai wrote:
>
>> How can i block and release the mouse and keyboard and how can a
>> simulate a key pressed in ruby? (for exemple i want to press enter
>> key)
>>
>> --
>> Posted via http://www.ruby-....
>>
>
> Depends ..

depends of what?
i have a window with OK and CANCEL button wich appears. and i want when
that window is active to block the mouse and the keyboard and send the
key enter to press the OK button

--
Posted via http://www.ruby-....

Alex Young

7/5/2007 9:28:00 AM

0

Bulhac Mihai wrote:
> John Joyce wrote:
>> On Jul 4, 2007, at 2:29 AM, mihai wrote:
>>
>>> How can i block and release the mouse and keyboard and how can a
>>> simulate a key pressed in ruby? (for exemple i want to press enter
>>> key)
>>>
>>> --
>>> Posted via http://www.ruby-....
>>>
>> Depends ..
>
> depends of what?
> i have a window with OK and CANCEL button wich appears. and i want when
> that window is active to block the mouse and the keyboard and send the
> key enter to press the OK button
>
Ok, so now we know it's not a web app. Which platform are you
developing on? What toolkit? Or are you driving a second app from your
ruby script? Can you show us some code?

--
Alex

Alin Popa

7/5/2007 11:02:00 AM

0

mihai wrote:
> How can i block and release the mouse and keyboard and how can a
> simulate a key pressed in ruby? (for exemple i want to press enter key)

Hi Mihai,

This may be a GUI toolkit specific issue.
So, you need to look for the hint into the gui toolkit(eg. GTK, QT, Tk)
specifications.

All the best,

Alin

--
Posted via http://www.ruby-....

Dan Stevens (IAmAI)

7/5/2007 1:06:00 PM

0

> i have a window with OK and CANCEL button wich appears. and i want when
> that window is active to block the mouse and the keyboard and send the
> key enter to press the OK button

This to me sounds like you're trying to achieve keyboard and mouse
emulation. Is this correct?

On 05/07/07, Bulhac Mihai <mihai.bulhac@yahoo.com> wrote:
> John Joyce wrote:
> > On Jul 4, 2007, at 2:29 AM, mihai wrote:
> >
> >> How can i block and release the mouse and keyboard and how can a
> >> simulate a key pressed in ruby? (for exemple i want to press enter
> >> key)
> >>
> >> --
> >> Posted via http://www.ruby-....
> >>
> >
> > Depends ..
>
> depends of what?
> i have a window with OK and CANCEL button wich appears. and i want when
> that window is active to block the mouse and the keyboard and send the
> key enter to press the OK button
>
> --
> Posted via http://www.ruby-....
>
>

John Joyce

7/5/2007 2:45:00 PM

0


On Jul 5, 2007, at 8:06 AM, Dan Stevens (IAmAI) wrote:

>> i have a window with OK and CANCEL button wich appears. and i want
>> when
>> that window is active to block the mouse and the keyboard and send
>> the
>> key enter to press the OK button
>
> This to me sounds like you're trying to achieve keyboard and mouse
> emulation. Is this correct?
>
> On 05/07/07, Bulhac Mihai <mihai.bulhac@yahoo.com> wrote:
>> John Joyce wrote:
>> > On Jul 4, 2007, at 2:29 AM, mihai wrote:
>> >
>> >> How can i block and release the mouse and keyboard and how can a
>> >> simulate a key pressed in ruby? (for exemple i want to press enter
>> >> key)
>> >>
>> >> --
>> >> Posted via http://www.ruby-....
>> >>
>> >
>> > Depends ..
>>
>> depends of what?
>> i have a window with OK and CANCEL button wich appears. and i want
>> when
>> that window is active to block the mouse and the keyboard and send
>> the
>> key enter to press the OK button
>>
>> --
>> Posted via http://www.ruby-....
>>
>>
>
That's what I mean by depends... it depends greatly on the
environment you want it to work in. Unfortunately this sort of thing
can be very implementation specific. Unix shell? Dos box? Windows? OS
X ? KDE?
All have their own ways of doing this stuff.