Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > mouse block and key pressed simulation?

Reply
Thread Tools

mouse block and key pressed simulation?

 
 
mihai
Guest
Posts: n/a
 
      07-04-2007
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-forum.com/.

 
Reply With Quote
 
 
 
 
John Joyce
Guest
Posts: n/a
 
      07-04-2007

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-forum.com/.
>


Depends ..

 
Reply With Quote
 
 
 
 
Bulhac Mihai
Guest
Posts: n/a
 
      07-05-2007
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-forum.com/.
>>

>
> 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-forum.com/.

 
Reply With Quote
 
Alex Young
Guest
Posts: n/a
 
      07-05-2007
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-forum.com/.
>>>

>> 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

 
Reply With Quote
 
Alin Popa
Guest
Posts: n/a
 
      07-05-2007
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-forum.com/.

 
Reply With Quote
 
Dan Stevens (IAmAI)
Guest
Posts: n/a
 
      07-05-2007
> 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 <> 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-forum.com/.
> >>

> >
> > 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-forum.com/.
>
>


 
Reply With Quote
 
John Joyce
Guest
Posts: n/a
 
      07-05-2007

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 <> 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-forum.com/.
>> >>
>> >
>> > 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-forum.com/.
>>
>>

>

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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fo:Block can you check to see if a block contains any text by using the block id? morrell XML 1 10-10-2006 07:18 PM
Heres a mouse theres a mouse what a mouse do? unholy Gaming 37 09-17-2006 08:59 AM
tricky+frustrating: changing mouse handler while mouse pressed doesn't work Claus Atzenbeck Java 1 11-26-2004 09:40 AM
How to detect that a key is being pressed, not HAS been pressed earlier!?? Rune Python 6 01-29-2004 12:39 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57