snoopy Posted January 28, 2009 Share Posted January 28, 2009 Is there away of making ascript through Autoit , so it will press the buton W, and sleep 500? nothing fancy just pressing it ever 500 mil. Link to comment Share on other sites More sharing options...
AlmarM Posted January 28, 2009 Share Posted January 28, 2009 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 More sharing options...
BrettF Posted January 28, 2009 Share Posted January 28, 2009 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 Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
snoopy Posted January 28, 2009 Author Share Posted January 28, 2009 (edited) 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? tnxIN helpfile it only shows how to press not how to make it hold -.- i need hold Edited January 28, 2009 by snoopy Link to comment Share on other sites More sharing options...
snoopy Posted January 28, 2009 Author Share Posted January 28, 2009 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? tnxIN helpfile it only shows how to press not how to make it hold -.- i need hold/codeTraySetIcon("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 EndSwitchWEndHotKeySet("{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}") WEndFunc _Exit() ExitEndFuncHow do i make it stop after 1.5 sec? and go again? Link to comment Share on other sites More sharing options...
FireFox Posted January 28, 2009 Share Posted January 28, 2009 @snoopy you asked for many times easy things, so please make your code with TimerInit ; TimerDiff and Send("{Key up}") Cheers, FireFox. Link to comment Share on other sites More sharing options...
snoopy Posted January 28, 2009 Author Share Posted January 28, 2009 @snoopyyou 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 More sharing options...
FireFox Posted January 28, 2009 Share Posted January 28, 2009 @snoopy look at helpfile for understand functions and there is an example for each function until you wont have done any effort, I wont help you more... Cheers, FireFox. Link to comment Share on other sites More sharing options...
FireFox Posted January 28, 2009 Share Posted January 28, 2009 @snoopy its the last time i give you fish... $init = TimerInit() Send("{E down}") While 1 $diff = TimerDiff($init) If $diff >= 3000 Then Send("{E up}") EndIf WEnd Not tested. Cheers, FireFox. 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