Jump to content
Sign in to follow this  
Kuji

Its really simple but...

Recommended Posts

Kuji

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

Share this post


Link to post
Share on other sites
Monamo

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

Look 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]

Share this post


Link to post
Share on other sites
azure

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

Share this post


Link to post
Share on other sites
jaberwacky

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.

Share this post


Link to post
Share on other sites
BrettF
jaberwacky

K, how about this?

#Include <Misc.au3>

While 1
    
    If _isPressed( 41 )  Then
        Send( "s" )
        Sleep( 100 )
    EndIf
    
    Sleep( 100 )
WEnd

Share this post


Link to post
Share on other sites
jaberwacky

#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 by jaberwocky6669

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×