Orange9 Posted October 7, 2006 Share Posted October 7, 2006 Yeah, i've read the help function and and it tells me how to hold a key on the keyboard. Something like this: Opt("SendKeyDownDelay", x) where x is the number of milliseconds to hold the button for. Sure, thats great, but there is no parameter for me to input the key i want to press. The other method, where it says something like this: Send("{a down}") ;Holds the A key down Send("{a up}") ;Releases the A key Yeah, i can input the key i want, but theres no parameter for me to input the time i want it to hold the button. So...im kinda lost lol. It'd be great if someone can help me on this ^^ Link to comment Share on other sites More sharing options...
Xenobiologist Posted October 7, 2006 Share Posted October 7, 2006 Yeah, i've read the help function and and it tells me how to hold a key on the keyboard. Something like this: Opt("SendKeyDownDelay", x) where x is the number of milliseconds to hold the button for. Sure, thats great, but there is no parameter for me to input the key i want to press.The other method, where it says something like this:Send("{a down}") ;Holds the A key downSend("{a up}") ;Releases the A keyYeah, i can input the key i want, but theres no parameter for me to input the time i want it to hold the button. So...im kinda lost lol. It'd be great if someone can help me on this ^^Hi,First this Opt("SendKeyDownDelay", x)Second this Send("your key")So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
zcoacoaz Posted October 7, 2006 Share Posted October 7, 2006 What about Send ( "{a down}" ) Sleep ( 1000 ) Send ( "{a up}" ) to hold it for 1 second ? [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
Helge Posted October 7, 2006 Share Posted October 7, 2006 Now this wont be confusing for people who would like to help you when you havetwo similar topics... You probably noticed you posted the first one in the GUI-forum, but when you've created a topic in the wrong forum just leave it up to the mods tomove it for you. Mkay ?Main topic : http://www.autoitscript.com/forum/index.ph...c=34127&hl= Link to comment Share on other sites More sharing options...
Xenobiologist Posted October 7, 2006 Share Posted October 7, 2006 HI, or try this: Run("notepad.exe") Dim $time = 1000.00 Sleep(1000) $begin = TimerInit() While Round(TimerDiff($begin),2) <= $time Send("a") ToolTip(Round(TimerDiff($begin),2)) WEnd Exit So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Orange9 Posted October 8, 2006 Author Share Posted October 8, 2006 Alright, thx a lot! btw, is it possible to hold 2 keyboard buttons simultaneously? if so, how? Link to comment Share on other sites More sharing options...
jvanegmond Posted October 8, 2006 Share Posted October 8, 2006 This is a give-away .. Send("{a down}") Send("{b down}") Sleep(1000) Send("{a up}") Send("{b up}") github.com/jvanegmond Link to comment Share on other sites More sharing options...
theguy0000 Posted October 8, 2006 Share Posted October 8, 2006 (edited) Alright, thx a lot! btw, is it possible to hold 2 keyboard buttons simultaneously? if so, how?uhh Send ("{a down}") Send ("{b down}") Sleep(1000) Send ("{a up}") Send ("{b up}") i think that would work, hold them both down for 1 second. edit: lol, manadar posted the exact same code as me... Edited October 8, 2006 by theguy0000 The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
jvanegmond Posted October 8, 2006 Share Posted October 8, 2006 (edited) That's amazing Nice code theguy0000. Edited October 8, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
theguy0000 Posted October 8, 2006 Share Posted October 8, 2006 That's amazing Nice code theguy0000. lol The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
dandymcgee Posted October 8, 2006 Share Posted October 8, 2006 Lol, that's kinda scary... Manadar and theguy0000 have telepathic abilites... - Dan [Website] Link to comment Share on other sites More sharing options...
Orange9 Posted October 8, 2006 Author Share Posted October 8, 2006 oic....well what if i want to press the up and left arrow at the same time for 1 second? I tried: Send ("{{up} down}") Send ("{{left} down}") Sleep (1000) Send ("{{up} up}") Send ("{{left} up}") But i dont think it worked. AutoIt actually press those letters instead =/ Link to comment Share on other sites More sharing options...
jvanegmond Posted October 8, 2006 Share Posted October 8, 2006 Lol, that's kinda scary... Manadar and theguy0000 have telepathic abilites...True.. We often read other people's mi... Ugh, you dirty bastard! github.com/jvanegmond Link to comment Share on other sites More sharing options...
theguy0000 Posted October 8, 2006 Share Posted October 8, 2006 oic....well what if i want to press the up and left arrow at the same time for 1 second? I tried: Send ("{{up} down}") Send ("{{left} down}") Sleep (1000) Send ("{{up} up}") Send ("{{left} up}") But i dont think it worked. AutoIt actually press those letters instead =/Send ("{up down}") Send ("{left down}") Sleep (1000) Send ("{up up}") Send ("{left up}") The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
dandymcgee Posted October 8, 2006 Share Posted October 8, 2006 (edited) This appears to work: Send ("{up down}") Send ("{left down}") Sleep (1000) Send ("{up up}") Send ("{left up}") EDIT: Damnit! theguy0000 steals it again. Edited October 8, 2006 by dandymcgee - Dan [Website] Link to comment Share on other sites More sharing options...
theguy0000 Posted October 8, 2006 Share Posted October 8, 2006 This appears to work: Send ("{up down}") Send ("{left down}") Sleep (1000) Send ("{up up}") Send ("{left up}")hey...how'd you do that? The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
jvanegmond Posted October 8, 2006 Share Posted October 8, 2006 (edited) theguy0000 reads your mind, and posts your thoughts before you can. Or maybe the topic is cursed causing users to create duplicate posts!! Edited October 8, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
dandymcgee Posted October 8, 2006 Share Posted October 8, 2006 theguy0000 is definately telepathic... - Dan [Website] Link to comment Share on other sites More sharing options...
jvanegmond Posted October 8, 2006 Share Posted October 8, 2006 Or maybe it's the combination of the three of us, causing telepathy. The US Army would pay millions for such a thing. *dollar signs in eyes* github.com/jvanegmond Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 8, 2006 Moderators Share Posted October 8, 2006 Or maybe it's the combination of the three of us, causing telepathy. The US Army would pay millions for such a thing. *dollar signs in eyes*No, they'd request your assistance for free, and if you declined, kill you so no one else could have you at a cost.... You didn't see that comming? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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