Jump to content

Help a newbie :P


Recommended Posts

Hey guys, im new to this, im trying to figure out how to wright a script where i push a button and it in sequence press's like 4 other buttons

something like when i push the 8 button, and then it makes the 4, 7, 0, and 2 go down in that sequence.

Link to comment
Share on other sites

This is a fairly simple task.. if you go through the tutorials provided by autoit, then I'm sure you will be able to acomplish this..

Good luck! :)

I would help but I dont have time muttley I am at work

Link to comment
Share on other sites

You would need HotKeySet() and Send() or ControlSend()

building on that, u would use somethin like,

hotkeyset("8", Name_Of_Function)

then make a function that sends those keys like,

Func sequence()
    send("4702")
EndFunc

or replace the send function with whatever code you want to execute

Edited by Damastah
Link to comment
Share on other sites

you would probably want to use _IsPressed or set the key to something that you dont use (like F9) in stead of HotKeySet because HotKeySet would make the initial key that you need to press not work as a key.

Like this

#include "Misc.au3"
$active=0
While 1
    If $active=0 Then
        If _IsPressed(38) Then ;38 is the 8 key, and 34 is the 4 key
            Send("4702")
            $active=10
        EndIf
    Else
        $active=$active-1
    EndIf
    Sleep(10)
WEnd

This way the 8 registers as a keypress and is part of the sequence. if you dont want 8 to be part of the sequence replace _IsPressed(38) with _IsPressed(34) and Send("4702") with Send("702")

For a file with constants on what keys are what, use MiscConstants.au3

Edit:added code example

Edit2:added link to misc constants

Edited by NerdFencer

_________[u]UDFs[/u]_________-Mouse UDF-Math UDF-Misc Constants-Uninstaller Shell

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...