AutoHotKey while loop breaks - Stack Overflow

文章推薦指數: 80 %
投票人數:10人

Every few uses the while loop breaks and keeps spamming forever until i press the bind again. autohotkey · Share. Share a ... Home Public Questions Tags Users Companies Collectives ExploreCollectives Teams StackOverflowforTeams –Startcollaboratingandsharingorganizationalknowledge. CreateafreeTeam WhyTeams? Teams CreatefreeTeam Collectives™onStackOverflow Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost. LearnmoreaboutCollectives Teams Q&Aforwork Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch. LearnmoreaboutTeams AutoHotKeywhileloopbreaks AskQuestion Asked 1year,5monthsago Modified 1year,5monthsago Viewed 110times 0 $*e:: WhileGetKeyState("e","P") { Send,{Blind}e Sleep,10;every10miliseconds } Return Everyfewusesthewhileloopbreaksandkeepsspammingforeveruntilipressthebindagain. autohotkey Share Follow askedMar20,2021at19:07 PetrDvořákPetrDvořák 511bronzebadge 3 Iamunabletoreplicatethisissue,couldyoupleaseprovidemoredetailsorpossiblycreateavideodocumentingthisissue? – Spyre Mar20,2021at19:21 @SpyreI'mabletoreplicateitonlyifIuseSendModeInput,which,tobefair,isinthestandardAHKheader.IassumetheOPhasleftthestandardAHKheaderintheirscript. – CharlieArmstrong Mar20,2021at19:28 @Spyrevimeo.com/526661580linktothevideoijustrecorded(ijustdofewpressanditworksfineandthanitbreaksandstartsspamming) – PetrDvořák Mar20,2021at19:35 Addacomment  |  1Answer 1 Sortedby: Resettodefault Highestscore(default) Trending(recentvotescountmore) Datemodified(newestfirst) Datecreated(oldestfirst) 0 AlthoughIamstillunabletoreplicatethisissue,basedonwhat@CharlieArmstrongmentioned,thescriptmayworkproperlyifSendEventisusedinsteadofaSendInput.ThefollowingmodifiedscriptwouldstillkeeptheSendModeasInput,butwouldoverrideonlytheSendstatementinsidethewhileloop. $*e:: WhileGetKeyState("e","P") { SendEvent,{Blind}e Sleep,10;every10miliseconds } Return MoreinformationaboutSendandSendModecanbefoundhereandhere. Share Follow answeredMar20,2021at20:01 SpyreSpyre 2,04411goldbadge33silverbadges1919bronzebadges Addacomment  |  YourAnswer ThanksforcontributingananswertoStackOverflow!Pleasebesuretoanswerthequestion.Providedetailsandshareyourresearch!Butavoid…Askingforhelp,clarification,orrespondingtootheranswers.Makingstatementsbasedonopinion;backthemupwithreferencesorpersonalexperience.Tolearnmore,seeourtipsonwritinggreatanswers. Draftsaved Draftdiscarded Signuporlogin SignupusingGoogle SignupusingFacebook SignupusingEmailandPassword Submit Postasaguest Name Email Required,butnevershown PostYourAnswer Discard Byclicking“PostYourAnswer”,youagreetoourtermsofservice,privacypolicyandcookiepolicy Nottheansweryou'relookingfor?Browseotherquestionstaggedautohotkeyoraskyourownquestion. TheOverflowBlog WhyAIishavinganon-premmoment(Ep.476) Opensourceandaccidentalinnovation FeaturedonMeta Recentsiteinstability,majoroutages–July/August2022 PleasewelcomeValuedAssociate#1301-Emerson The[maintenance]tagisbeingburninated StagingGroundWorkflow:QuestionLifecycle Whatshouldwedowithimproperlycitedposts? Related 0 Autohotkey,issueaftermappingcapslock::ctrl 1 Autohotkey-Keyloopmakingshiftkeycombosnotwork 1 AutoHotkey:While2keysarepressed=press3rdkey? 3 Autohotkey:Sendonlyoncewhenhelddown 1 AutoHotKey:Triggerinfiniteloopofkeyboardbuttonpresswhenpressinganotherkeyboardbutton 0 IteratingafiletreewithawhileloopwithAutoHotKey 1 Howdoyouincludealoopwithmodifiers? 0 AutoHotkeyv1useoneshortcutasswitchcontrolgivenloopactiononoroff 0 AutoHotkey:Holddownkeywhiletrue 0 autohotkey:gettingcharactersofastringsent,whiletypingnormally,tostaytogether HotNetworkQuestions ----AddColours---- Whydon'tdeuteronsproduceahelium-4nucleuswhentheyfuse? WhydoeseveryoneinTheLordoftheRingsuse"vous"? Howaboutastatementwithoutproof? Whataretheeffectsofmakingawomanaslightasaduck? HowdoIgetroundededgesonafootballshapeinInkscape? Whydoes'onsteroids'suggestthemeaningofexaggerationorenhancement? Howtobevelaplanemadeofbezier? Ismymacfilevaultencrypted? Wishtoknowallaboutplanes,wheredoistart? HowcanIidentifyanembeddedLinuxdistribution? Whatdoesthissymbolonavoltmeterrepresent? Breakerpanellocationnexttosink.Isthisokay? Howtoadequatelysecurealiquidfillinginapieceofpastry? ClearScreeninPowerShellandCommandLinewithouterasingeverything IsJohn6:4authentic? Howdoweensureanorbitofasatellitedoesn’tinterferewithexistingones? WhencanaPhDstudentremovesomeoneasaco-authorfromapaper? HowdoChristiansrespondtothecriticismthatJesusofNazarethdidnotbringworldpeace? HowdoIdeterminefromthedocumentationwhattypeofexceptionafunctioncanthrow? Whydopeoplegenerallydopostdoc? Avoidbreakingwordsbeforeorafterasterisk('*') Isakickventrequiredonresonanthead? ManagerismadthatIcannolongerworkonweekendsforfamilyreasons morehotquestions Questionfeed SubscribetoRSS Questionfeed TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader. Yourprivacy Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy. Acceptallcookies Customizesettings  



請為這篇文章評分?