I need a Keystroke macro program, plzz help

Discussion in 'Software' started by brahman, Apr 12, 2006.

  1. brahman

    brahman Specialist

    okay heres the thing.


    i play this online game, and all i really need is to get a program that will continuosly repeat


    (Ctrl+ the up and down key functions) up, down, up, down, up, down, over and over again. while holding the Ctrl button.


    can anyone suggest an easy to use freeware program for this?
     
  2. Mada_Milty

    Mada_Milty MajorGeek

    Code:
    dim o_shell
    dim v_count
    
    set o_shell = createobject ("WScript.Shell")
    
    for v_count = 1 to 100 step 1
    o_shell.sendkeys "{UP}"
    o_shell.sendkeys "{DOWN}"
    next
    
    WScript.quit()
    If you were to copy this code into notepad, and save as filename.vbs you would have a program that would press up, down 100 times over. You can adjust how many times it does that by changing the number on the line that says "for v_count = 1 to 100 step 1", or do it continuously by changing that line to "do until true = false" and changing "next" to "loop"... please note that you would have to end the wscript.exe process in task manager to end the program if you were to do that, though.
     
  3. Mada_Milty

    Mada_Milty MajorGeek

    Ooops! Missed that you require CTRL + up! Where it says "{UP}", change to "^{UP}" and "{DOWN}" to "^{DOWN}"

    The ^ is equivalent to the ctrl key.
     
  4. brahman

    brahman Specialist

    hey thanks for the help, the only thing though is that it does it too fast for the game to read.



    i need this to happen every 30 seconds, if that is possible.
     
  5. Mada_Milty

    Mada_Milty MajorGeek

    Code:
    dim o_shell
    dim v_count
    
    set o_shell = createobject ("WScript.Shell")
    
    for v_count = 1 to 100 step 1
    o_shell.sendkeys "{UP}"
    o_shell.sendkeys "{DOWN}"
    WScript.Sleep 30000
    next
    
    WScript.quit()
    Here, I've revised the script to wait 30000 milliseconds (30 seconds) before pressing up and down again. You can move the line WScript.Sleep to wherever you need it.. ie before the up, before the down, etc.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds