Ravokion Posted July 9, 2008 Share Posted July 9, 2008 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 More sharing options...
Kovitt Posted July 9, 2008 Share Posted July 9, 2008 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 More sharing options...
AdmiralAlkex Posted July 9, 2008 Share Posted July 9, 2008 You would need HotKeySet() and Send() or ControlSend() .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Damastah Posted July 9, 2008 Share Posted July 9, 2008 (edited) 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 July 9, 2008 by Damastah Link to comment Share on other sites More sharing options...
NerdFencer Posted July 9, 2008 Share Posted July 9, 2008 (edited) 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) WEndThis 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.au3Edit:added code exampleEdit2:added link to misc constants Edited July 9, 2008 by NerdFencer _________[u]UDFs[/u]_________-Mouse UDF-Math UDF-Misc Constants-Uninstaller Shell Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now