Jump to content

Keyboard?


snoopy
 Share

Recommended Posts

HotKeySet("{ESC}", "_Exit")

While 1
    Sleep(500)
    Send("{W}")
WEnd

Func _Exit()
    Exit
EndFunc

Something like this?

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

Link to comment
Share on other sites

Hi,

Look at the helpfile.

You want to Send some keys, and Sleep and Loop it.

Now that was an usually big hint... Go search.

Brett

well.... I tried but it doesent make it hold the key.... it just preses it and like hmm... lets it go..

where is the example? tnx

IN helpfile it only shows how to press not how to make it hold -.- i need hold

Edited by snoopy
Link to comment
Share on other sites

well.... I tried but it doesent make it hold the key.... it just preses it and like hmm... lets it go..

where is the example? tnx

IN helpfile it only shows how to press not how to make it hold -.- i need hold

/code

TraySetIcon("shell32.dll",246)

#include <ButtonConstants.au3>

#include <GUIConstantsEx.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("Form1", 298, 226, 193, 115, $WS_POPUP, 0)

$Pic1 = GUICtrlCreatePic(@WINDOWSDIR&"\Greenstone.bmp", 0, 0, 297, 225, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

GuiCtrlSetState(-1,$GUI_DISABLE)

$START = GUICtrlCreateButton("START", 96, 64, 113, 49, 0)

GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")

GUICtrlSetColor(-1, 0xFFFFFF)

GUICtrlSetBkColor(-1, 0x808000)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $START

GUIDelete($Form1)

ExitLoop

EndSwitch

WEnd

HotKeySet("{ESC}", "_Exit")

While 1

Sleep(500)

Send("{W down}")

Sleep(500)

Send("{W down}")

Sleep(500)

Send("{W down}")

Sleep(500)

Send("{W down}")

Sleep(500)

Send("{W down}")

Sleep(500)

Send("{W down}")

Sleep(500)

Send("{W down}")

Sleep(500)

Send("{W down}")

WEnd

Func _Exit()

Exit

EndFunc

How do i make it stop after 1.5 sec? and go again?

Link to comment
Share on other sites

@snoopy

you asked for many times easy things, so please make your code with TimerInit ; TimerDiff and Send("{Key up}")

Cheers, FireFox.

TimerDiff and Send("{W down}")

TimerDiff 300???

or is it sleep that you put after?

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...