bf2forlife Posted April 19, 2008 Share Posted April 19, 2008 here is my script: PixelSearch(0,0,1024,768,0x725F4D) if @error Then Send("{UP down}") Sleep(3000) Send("{UP up}") EndIF It presses up arrow only once, how i can keep it down for 3 secs? Link to comment Share on other sites More sharing options...
d4rk Posted April 20, 2008 Share Posted April 20, 2008 can't see the problem, the code is ok [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
okdewit Posted April 25, 2008 Share Posted April 25, 2008 (edited) From the helpfile: Opt("SendKeyDownDelay",$milliseconds) alters the length of time a key is held down before being released during a keystroke. Perhaps it helps. (this is a global setting, not just for the Up key but for ALL send commands) Edited April 25, 2008 by okdewit Link to comment Share on other sites More sharing options...
ProgAndy Posted April 25, 2008 Share Posted April 25, 2008 Doesn't work, too Windows sends ~ every 50 ms a new KeyDown, i think: $x = TimerInit() Do Send("{UP down}") Sleep(50) Until TimerDiff($x) > 3000 Send("{UP up}") *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
disc330 Posted April 25, 2008 Share Posted April 25, 2008 I am having this same kind of problem, however I am trying to send F5. The timer above seemed to not change anything. I want the key to be held down as if it were being repeated. (Like what would happen if you held down 'a' in word). Still learning...I love autoit. :) Link to comment Share on other sites More sharing options...
ProgAndy Posted April 25, 2008 Share Posted April 25, 2008 Does it work this way? $ms = 3000 ; Time to press $key = "UP" ; Key to press $Old = Opt("SendKeyDelay",50) Send("{"&$key&" "& Floor($ms/50) &" down}{"&$key&" up}") Opt("SendKeyDelay",$Old) *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes 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