Results 1 to 6 of 6

Thread: how to know if a key is pressed?

  1. #1
    Normal User Healer Dark's Avatar
    Join Date
    Jul 2012
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    15
    Rep Power
    5

    how to know if a key is pressed?

    is there any way for me to know if the "X" key is pressed? like a keypress, I gave it a read at the library sirmate, and saw her VK a variable that stores keys, until I took a look at it, + I do not know how to know if a key is pressed, is how to do this? : X
    ~~~~~~~~~~~~~~~~~~~~~~~~
    Healer Dark
    ~~~~~~~~~~~~~~~~~~~~~~~~

  2. #2
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Why?

    You can setup a hotkey, but it sounds more like you're trying to make a keylogger.

  3. #3
    Normal User Healer Dark's Avatar
    Join Date
    Jul 2012
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    15
    Rep Power
    5
    is that I'm trying to make a hotkey strike intelligent. lol, example, in the bot hotkey normal i press f1, and within that hotkey I want to get if I'm holding shift or ctrl or alt, thus deciding which strike use, do not want to create 3 hotkeys that do the same thing, more rather a hotkey, able to know what I really want, understand? xd
    ~~~~~~~~~~~~~~~~~~~~~~~~
    Healer Dark
    ~~~~~~~~~~~~~~~~~~~~~~~~

  4. #4
    Normal User Healer Dark's Avatar
    Join Date
    Jul 2012
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    15
    Rep Power
    5
    code exemple:
    PHP Code:
    local MONSTERS = {
        
    Frigo = {"Banshee","Dark Torturer","Demon","Lost Soul","Betrayed Wraith","Hand of Cursed Fate","Fury"},
        
    Vis = {"Defiler","Plaguesmith","Son of Verminor","Blightwalker","Phantasm","Juguernout"}
    }
    -- [[ 
    END ]] -- 

    if 
    table.find(MONSTERS.Frigotarget.name) and not PresKey(controlthen
        usehotkey
    ("F12"wait(200)
    elseif 
    table.find(MONSTERS.Visfollow.name) and not PresKey(shiftthen
        usehotkey
    ("f11"wait(200)
    else
        
    usehotkey("f12"wait(200)
    end 
    ~~~~~~~~~~~~~~~~~~~~~~~~
    Healer Dark
    ~~~~~~~~~~~~~~~~~~~~~~~~

  5. #5
    iBot User Dehan's Avatar
    Join Date
    May 2012
    Location
    www.ssocialscripts.com
    Posts
    910
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    114
    Rep Power
    7
    I'm not sure if you will like this idea, but works +- as what you are trying to make, here an example:

    PHP Code:
    local MONSTERS = {
        
    Frigo = {"Banshee","Dark Torturer","Demon","Lost Soul","Betrayed Wraith","Hand of Cursed Fate","Fury"},
        
    Vis = {"Defiler","Plaguesmith","Son of Verminor","Blightwalker","Phantasm","Juguernout"}
    }
    local VisHK clienttexthotkey("exori vis""automatic")
    local FrigoHK clienttexthotkey("exori frigo""automatic")

    --[ [ 
    END ] ]--

    if 
    table.find(MONSTERS.Frigotarget.namethen
        usehotkey
    (FrigoHKwait(200)
    elseif 
    table.find(MONSTERS.Vistarget.namethen
        usehotkey
    (VisHKwait(200)
    end 
    Last edited by Dehan; 09-23-2013 at 06:31 AM.
    Check out - Dehan Accounts Service!

    Proud Scripter of BUgWT STAFF

  6. #6
    Normal User Healer Dark's Avatar
    Join Date
    Jul 2012
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    15
    Rep Power
    5
    does not work for what I need = \, I need something like this:
    I'll use this hotkey in bot as "f1", but I have other important hotkey in "ctrl + f1" and "shift + F1", and I would not change any of these, however, I did not want the hotkey of "f1 "work, if I press" control "or" shift "; s
    ~~~~~~~~~~~~~~~~~~~~~~~~
    Healer Dark
    ~~~~~~~~~~~~~~~~~~~~~~~~

Tags for this Thread

Posting Permissions

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