Kuji Posted January 14, 2009 Posted January 14, 2009 I'm still new to autoit, I just got time to learn it. All i wanted to know is if someone could provide me with a sample script that would show me how to make it so everytime i hit a key, autoit would send another key. like if every time i hit "a" it sent "s" so that if i hit "a" 4 times it would look like this in notepad asasasas Thanks in advance. <3
Monamo Posted January 14, 2009 Posted January 14, 2009 I'm still new to autoit, I just got time to learn it.All i wanted to know is if someone could provide me with a sample script that would show me how to make it so everytime i hit a key, autoit would send another key.like if every time i hit "a" it sent "s" so that if i hit "a" 4 times it would look like this in notepadasasasasThanks in advance. <3Look into:_IsPressed()Send() or ControlSend()in the help file - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]
azure Posted January 14, 2009 Posted January 14, 2009 I'm still new to autoit, I just got time to learn it. All i wanted to know is if someone could provide me with a sample script that would show me how to make it so everytime i hit a key, autoit would send another key. like if every time i hit "a" it sent "s" so that if i hit "a" 4 times it would look like this in notepad asasasas Thanks in advance. <3 HotKeySet("a","sendme") Func Sendme() HotKeySet("a") SEND("a") HotKeySet("a","sendme") SEND("s") EndFunc While 1 SLEEP(100) WEnd
jaberwacky Posted January 15, 2009 Posted January 15, 2009 HotKeySet("a","sendme") Func Sendme() HotKeySet("a") SEND("a") HotKeySet("a","sendme") SEND("s") EndFunc While 1 SLEEP(100) WEndoÝ÷ Ûú®¢×ºÚ"µÍÝÙ^TÙ] ][ÝØI][ÝË ][ÝÜÙ[YI][ÝÊB[ÈÙ[YJ BÑS ][ÝØÉ][ÝÊB[[ÂÚ[HBÓQT L BÑ[ You know, I actually thought that I could tweak this code. But the above example does not work. I am baffled. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum?
BrettF Posted January 15, 2009 Posted January 15, 2009 The hotkey has to be deactivated. 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!
jaberwacky Posted January 15, 2009 Posted January 15, 2009 K, how about this? #Include <Misc.au3> While 1 If _isPressed( 41 ) Then Send( "s" ) Sleep( 100 ) EndIf Sleep( 100 ) WEnd Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum?
jaberwacky Posted January 15, 2009 Posted January 15, 2009 The hotkey has to be deactivated.Oh, good point!! Thanks! Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum?
jaberwacky Posted January 15, 2009 Posted January 15, 2009 (edited) #Include <Misc.au3> #Include <IsPressed UDF.au3> ; find this here: [url="http://www.autoitscript.com/forum/index.php?showtopic=86296&hl=ispressed+udf"]http://www.autoitscript.com/forum/index.ph...l=ispressed+udf[/url] HotKeySet( "{ESC}" , "terminate" ) Func terminate() Exit EndFunc Dim $keyArray[ 26 ] = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] While 1 If _IsAlphaKeyPressed() Then Send( $keyArray[ Random( 0 , 25 ) ] ) Sleep( 200 ) EndIf Sleep( 100 ) WEnd Output: Hxelwlov eqveerybtomdyr!f Coanx yosu rseatd tthisd? XD Edited January 15, 2009 by jaberwocky6669 Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum?
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