Results 1 to 14 of 14

Thread: What is the code...

  1. #1
    Join Date
    Aug 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    What is the code...

    Hey, I need to know how to do this. Below is some pseudo code:

    SCAR Code:
    sentinel = false;
    REPEAT
     BEGIN
      IF (ESC_KEY is pressed) THEN    // This is the line I don't know!
       BEGIN
        sentinel = false;
       END;
     END;
    UNTIL sentinel = true;

    Can somebody please tell me how to register when the esc key is pressed?

    Thanks for reading!
    http://www.muzz.trissy.org/cool/sig-boonce.jpg
    boonce.org - Free Image and File Hosting
    "You'll have to speak up I'm wearing a towel." - Homer

  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    run scar do F1 theres a guide search somthing like keydown(3)
    ~Hermen

  3. #3
    Join Date
    Aug 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by hermpie View Post
    run scar do F1 theres a guide search somthing like keydown(3)
    I already know about the function IsKeyDown()... I want to know what the code for what I asked above is. Which is, how to perform the same thing only with the "escape" key?

    http://www.muzz.trissy.org/cool/sig-boonce.jpg
    boonce.org - Free Image and File Hosting
    "You'll have to speak up I'm wearing a towel." - Homer

  4. #4
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ISKeyDown(ESC_KEY)

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  5. #5
    Join Date
    Aug 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Dumpin View Post
    ISKeyDown(ESC_KEY)
    Please only post if you know; spammer.
    http://www.muzz.trissy.org/cool/sig-boonce.jpg
    boonce.org - Free Image and File Hosting
    "You'll have to speak up I'm wearing a towel." - Homer

  6. #6
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Quote Originally Posted by Boonce View Post
    Please only post if you know; spammer.
    You spam.
    He gave you the solution to the problem, and you call him a spammer? That's what I call spam.

    Actually, the right code is IsKeyDown(VK_ESCAPE)
    I made a new script, check it out!.

  7. #7
    Join Date
    Aug 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Markus View Post
    You spam.
    He gave you the solution to the problem, and you call him a spammer? That's what I call spam.

    Actually, the right code is IsKeyDown(VK_ESCAPE)
    Actually, the right code is IsFunctionKeyDown(VK_ESCAPE), but your post helped me in identifying the value for the escape key. Thanks.

    I call him a spammer as he just posted for the post count, not because he actually wanted to help the community in any way. He had not tested his code and had no idea whether it actually worked or not.

    I would say the same about your post because it would be quite obvious that IsKeyDown() would not work with the escape key as it expects a character value.

    In the future: Don't post if you don't know.

    Cheers.
    http://www.muzz.trissy.org/cool/sig-boonce.jpg
    boonce.org - Free Image and File Hosting
    "You'll have to speak up I'm wearing a towel." - Homer

  8. #8
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    First of all, I thought that was the solution, second is that you posted right before me and didn't saw the post. then... if you used the search button / looked in the manual right away. you didn't have to make those 4 posts here.

    Do a little thinking before start asking.

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  9. #9
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Quote Originally Posted by Boonce View Post
    Actually, the right code is IsFunctionKeyDown(VK_ESCAPE), but your post helped me in identifying the value for the escape key. Thanks.

    IsFunctionkeyDown is for the F Keys
    If you want to convert the VK_ESCAPE to a char, do chr(VK_ESCAPE)
    I made a new script, check it out!.

  10. #10
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Markus View Post
    IsFunctionkeyDown is for the F Keys
    If you want to convert the VK_ESCAPE to a char, do chr(VK_ESCAPE)
    actually markus for Fkeys you use IsFKeyDown, boonce is right, although his attitude leaves a lot to desire.

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  11. #11
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Uhh, everyone wanna open SCAR manual and see the ASCII table?

  12. #12
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Gah that ASCII table gives me a headache. Theres another table somewhere in these forums with the common keyboard codes. Its made by R0b0t1 from memory.

  13. #13
    Join Date
    Aug 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    Gah that ASCII table gives me a headache. Theres another table somewhere in these forums with the common keyboard codes. Its made by R0b0t1 from memory.
    Thanks, I'll look it up.

    Btw RM, sorry if I rubbed you the wrong way... Just don't like it when kids post purely for post count...
    http://www.muzz.trissy.org/cool/sig-boonce.jpg
    boonce.org - Free Image and File Hosting
    "You'll have to speak up I'm wearing a towel." - Homer

  14. #14
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Boonce View Post
    Thanks, I'll look it up.

    Btw RM, sorry if I rubbed you the wrong way... Just don't like it when kids post purely for post count...
    I don't think he was. If he was a post-hungry type of person his post count would be greater that 560. He was just trying to help.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How do you code?
    By Wrycu in forum C/C++ Help and Tutorials
    Replies: 17
    Last Post: 10-27-2008, 02:10 PM
  2. Sharing Code
    By mat_de_b in forum News and General
    Replies: 6
    Last Post: 10-18-2007, 08:51 PM
  3. Code Box
    By Bam Bam in forum News and General
    Replies: 2
    Last Post: 08-15-2006, 10:45 AM

Posting Permissions

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