Verssuss Posted January 27, 2019 Share Posted January 27, 2019 HotKeySet("{F1}", "_hold") HotKeySet("{F2}", "_release") While 1 Sleep(100) WEnd Func _hold() Send("{a down}") EndFunc Func _release() Send("{a up}") EndFunc why this wont work how i want ? I just want press F1 to start hold key "a" and release it later by hit F2 by hit F1 just appear x1 "a" letter Link to comment Share on other sites More sharing options...
Developers Jos Posted January 27, 2019 Developers Share Posted January 27, 2019 That is because that is what you have coded. The character repeat functions is a keyboard function, so you need to code that in the script when you want to simulate that. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Verssuss Posted January 27, 2019 Author Share Posted January 27, 2019 (edited) How can I do it to work as I wrote? i can put 100x {a down} but this not fix my problem Edited January 27, 2019 by Verssuss Link to comment Share on other sites More sharing options...
BrewManNH Posted January 27, 2019 Share Posted January 27, 2019 Put it in a loop that doesn't end until you hit the F2 key. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Verssuss Posted January 27, 2019 Author Share Posted January 27, 2019 thx bro i hear. if something is stupid but work thats is not stupid xD sorry formy english i already got idea but there is a "better" way ? HotKeySet("{F1}", "_switch") HotKeySet("{F2}", "_switch2") $x = False While 1 Sleep(100) WEnd Func _switch() $x = False While 1 If $x = False Then Send("{a down}") WEnd EndFunc Func _switch2() $x = True EndFunc if any suggestion to make it more clear Link to comment Share on other sites More sharing options...
Verssuss Posted January 27, 2019 Author Share Posted January 27, 2019 ok i cant do better than this for now HotKeySet("{F1}", "_switch") HotKeySet("{F2}", "_switch2") $x = False While 1 Sleep(100) WEnd Func _switch() $x = Not $x While 1 If $x = True Then Send("{a down}") WEnd EndFunc but i wanted try like this: while $x = True Send("{a down}") Wend but not working Link to comment Share on other sites More sharing options...
Nine Posted January 27, 2019 Share Posted January 27, 2019 What game is this ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Verssuss Posted January 27, 2019 Author Share Posted January 27, 2019 should i report u or u just bring trash here for fun ?? Link to comment Share on other sites More sharing options...
spudw2k Posted January 28, 2019 Share Posted January 28, 2019 @Nine was just trying to legitimize the purpose and intent of your script. Key spamming such as your example is more frequently than not associated with game bots. So no, it's not trash; and the fact you remain vague and got defensive doesn't bode well. So how 'bout we ask a different way....what are you trying to automate? Feel free to report, it may draw the attention this thread is shaping up to warrant either way. FrancescoDiMuro 1 Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Developers Jos Posted January 28, 2019 Developers Share Posted January 28, 2019 6 hours ago, Nine said: What game is this ? Please don't, just stay out or report in case you are sure it is in violation with our rules. 6 hours ago, Verssuss said: should i report u or u just bring trash here for fun ?? Please don't react like this either, it doesn't contribute to any fruitful discussion... but while we are on the subject: You haven't told us which program needs this many repeats for the letter a yet, so what is it you are doing here? Jos TheDcoder 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Verssuss Posted January 28, 2019 Author Share Posted January 28, 2019 (edited) i need just hold specyfic keys on my laptop. its not for game... im doing alot simple test code need lern autoit better. anyway. thets i just lern about holds any keys there are 4 ways to do that. now my point is make code to hold any kay i want but all ways almost failed. there is one best way like {shiftdown}{ctrldown}and{altdown} this working perfect but only for this 3 keys many repeats mean nothink now for me just need hold and release or how just quit loop what holding key E: im kinda new on this forum i have script like udf i made but dont know where to show it and wait for opinion Edited January 28, 2019 by Verssuss Link to comment Share on other sites More sharing options...
Nine Posted January 28, 2019 Share Posted January 28, 2019 17 hours ago, Jos said: report in case you are sure Sometimes you know but you can't be sure. So better be honest and say what needs to be say... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Verssuss Posted January 29, 2019 Author Share Posted January 29, 2019 i dont understand this forum... it looks like I'm enter to the shop what immediately means I am a thief. Link to comment Share on other sites More sharing options...
Nine Posted January 29, 2019 Share Posted January 29, 2019 9 minutes ago, Verssuss said: i dont understand this forum... it looks like I'm enter to the shop what immediately means I am a thief. So tell us what is the application you intend to implement with those key sends. And stop telling us, it is for learning purposes. Nobody here is searching for this type of knowledge. There is rules in this forum, maybe you don't like it, but you got to live with it. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Verssuss Posted January 29, 2019 Author Share Posted January 29, 2019 i dont need it for any game i dont need it for any application i dont need it for any program Link to comment Share on other sites More sharing options...
jchd Posted January 29, 2019 Share Posted January 29, 2019 Hence you don't need it. FrancescoDiMuro 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Developers Jos Posted January 29, 2019 Developers Share Posted January 29, 2019 9 hours ago, Nine said: Sometimes you know but you can't be sure. So better be honest and say what needs to be say... No you don't and I asked nicely not to, but the fact remain you simply report or move on without you needing to ask. 7 hours ago, Verssuss said: i dont need it for any game i dont need it for any application i dont need it for any program So we are done here. Please don't waste my time and the space here when you can't be honest. *click* Jos FrancescoDiMuro 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 29, 2019 Moderators Share Posted January 29, 2019 To add to what Jos stated above, @Nine you would do well to read the following thread carefully: Pestering newcomers with questions because you think maybe they're doing something against the rules is not good enough. If the OP states something specifically against the rules, report it. If you are unsure whether it is against the rules or not, report it. And don't, as some around here do, report it and then help in the thread or report it and then continue to harangue the poster; report and move on. We have had sanction forum members in the past for wanting to play detective and grill others over their intentions - no one on the Moderation team wants to go back to having to do that. Verssuss 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts