Sign in to follow this  
Followers 0
deathbeacon

Send d key twice when each time i press a designated hotkey

7 posts in this topic

#include <Misc.au3>
HotKeySet("{ESC}", "Terminate")
Opt ("SendKeyDelay",15) ; delay between sending keys - default 5
Opt ("SendKeyDownDelay",5) ; how long to hold down a key - default 5
 
While 1
    Sleep(10) ; always a good idea so you dont max your cpu
    If _IsPressed('11') Then Send ("{SPACE}{SPACE}") ; '11' = a CTRL key
WEnd
 
Func Terminate()
    Exit 0
EndFunc   ;==>Terminate
 
Credits to Spookmeister
I tried using an existing autoit and changed the hotkeys but it seems this jus keeps pressing dd dd dd the whole way? instead of only when i press my hotkey in this case ctrl any help would be appreciated thx.

Share this post


Link to post
Share on other sites



Hi,

Welcome to the autoit forum :)

What do you need this script for?  :huh:

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Hmm its to play a game haha a micro i hate having to press dd twice to start a skill and cancel the animation so wondering if this could help. Thanks haHa ive actually been using autoit for games forawhile already jus that haha ive always used scripts by others... sorry for being noob and thanks for the welcome.

Share this post


Link to post
Share on other sites

Welcome to AutoIt and the forum!

Did you read the forum rules (link is in the lower right corner of each page)? Game automation isn't permitted here.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I thought it wasnt considered cos i had to press a key to press it twice each time so technically i must be there to press d when needed? so its not automated or games in general arent allowed? if so then i apologize then

Share this post


Link to post
Share on other sites

Lets see what the Mods say.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

deathbeacon,

 

its to play a game haha

I think our rules are perfectly clear. Thread locked. :naughty:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0