Results 1 to 9 of 9

Thread: KeyUp( GetKeyCode(' ') );

  1. #1
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default KeyUp( GetKeyCode(' ') );

    Two questions, is a proper/safe way for pressing and releasing Space bar

    Simba Code:
    KeyDown( GetKeyCode(' ') );
    Wait(blah);
    KeyUp( GetKeyCode(' ') );

    Secondly, if I call
    Simba Code:
    KeyUp( GetKeyCode(' ') );
    excessively (basically meaning, if I never told script to KeyDown, but tell script to KeyUp, will that even go though/will it look weird on RS?

  2. #2
    Join Date
    Nov 2011
    Posts
    92
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think the "key up" would only have an effect in Simba, not sure about the other question.

  3. #3
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    I'm assuming if I call KeyUp, and they key isn't even down, then nothing will be sent, so it should be okay to call it 'too much'.

  4. #4
    Join Date
    Nov 2011
    Posts
    92
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    I'm assuming if I call KeyUp, and they key isn't even down, then nothing will be sent, so it should be okay to call it 'too much'.
    I agree, nothing should be sent. I would give it a go, nothing should happen. As for the space bar, thats the only way I know of calling it aha

  5. #5
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    It would register as a long string of KEY_RELEASED events in Java, so it would be easy to spot if they were looking for it. And yes, I've tested this. Simba does send the event, and Java can pick it up.

  6. #6
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    So it will be safe then senrath?!
    You're saying Simba doesn't send it, so if simba doesn't send a KeyRelease if they key isn't down, then it should be fine?

  7. #7
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    You, um, misread what I said. I said that it does send it, and that Java does register that you sent it.

  8. #8
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    LOL! Gotcha, thanks!
    I misread your part that 'Simba DOES' as doesn't, so I thought I was okay. Thanks!

  9. #9
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    if(IsKeyDown(32)) then
    KeyUp(32)

    ?
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •