Results 1 to 7 of 7

Thread: IsRealKeyDown

  1. #1
    Join Date
    Dec 2011
    Posts
    733
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default IsRealKeyDown

    I am writing a utility that allows you to pick colors and test them through smart, but if the form is up, it seems to keep the script paused.

    The only solution i can think of is to close the form after picking your colors, test them, reopen the form, change your colors, and close it again so you can see the colors being found in Runescape.

    The problem: Smart is not allowing me to detect whether real keys are down, so i cant set a hot key to reopen the form.

    I tried using the 'IsRealKeyDown function from ObjectDTM but I do not have the FindAndSetTarget function. I have updated srl/simba but I don't have the function. Anyone else have this function, or a different solution?

    To better explain the functionality of my script, ill re-explain with how you would use it.

    1) You run the script, and the form pops up.
    2) you enter a few colors into the form.
    3) You close the form, and the script will search the RS screen for the colors you entered.
    4) every pixel matching the colors and tolerance will be painted in RuneScape.

    EDIT: just noticed I was a registered user. I remember the rules for becoming a junior mem changed, but i think i already met those conditions. Hmm

  2. #2
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    http://en.wikipedia.org/wiki/Modal_window
    I think you can edit smart.simba to do what you want though.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  3. #3
    Join Date
    Dec 2011
    Posts
    733
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    Yea Im not aware of making the form not a modal window, Thanks for the link btw.

    Also havent seen the actual smart file. will check into that.

    If i do that though anyone who uses the script will need to make the same changes

  4. #4
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    You are correct. Iirc, the file overwrites the existing IsKeyDown, etc. all IO methods with the SMART ones. So all you'd do is set a function to the old IsKeydown before SMART overwrites it. You can do that and send a pull request and have it added to SRL (if they feel it is a good idea).
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  5. #5
    Join Date
    Dec 2011
    Posts
    733
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    AFAIK I would need to rename the function in smart.simba in order to use the real iskeydown method, which would break scripts that use simba with the normal iskeydown in smart.

    Renaming the method did work. I may have misunderstood what you said about seting a function to the old one.

    this was my interpretation:
    Code:
    function IsRealKeyDown(key:word):Boolean;
    begin
      result := IsKeyDown(key);
    end;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i srl/srl/misc/paintsmart.simba}
    This gives the error '[Error] (181:8): Unknown identifier 'IsRealKeyDown' at line 180' in smart.simba. Line 180 is the declaration of iskeydown.

  6. #6
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Yeah, on second thought, not sure if this would be possible..you would have to use a different name causing scripts to break..
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  7. #7
    Join Date
    Dec 2011
    Posts
    733
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    Yea. Thank you for the temp fix Idea though =]

    The renaming in SMART.Simba will work for now. Anyone who uses the script should understand how to modify it ;]

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
  •