Jump to content

Its really simple but...


Kuji
 Share

Recommended Posts

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

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

K, how about this?

#Include <Misc.au3>

While 1
    
    If _isPressed( 41 )  Then
        Send( "s" )
        Sleep( 100 )
    EndIf
    
    Sleep( 100 )
WEnd
Link to comment
Share on other sites

#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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...