Sign in to follow this  
Followers 0
newb2007

sending text with numberpads

12 posts in this topic

hi..

i tried sending text with a press of a key <_<

#Include <Misc.au3>

if _IsPressed('61')

then

Send("{a 1}") ;Sends 1 'h' characters

Send("{a 1}") ;Sends 5 'e' characters

Send("{a 1}") ;Sends 5 'j' characters

endfunc

can anyone help me :S?

Share this post


Link to post
Share on other sites



#Include <Misc.au3>

if _IsPressed('61')

then

Send("{a 1}") ;Sends 1 'h' 1 a characters

Send("{a 1}") ;Sends 5 'e' 1 a characters

Send("{a 1}") ;Sends 5 'j' 1 a characters

endfunc

This script will run and exit immediately. Include a loop so it checks continuously.

But maybe using HotKeySet() is better..?

;Set hotkeys:
HotKeySet("{numpad1}", "a")
HotKeySet("{numpad2}", "e")
HotKeySet("{numpad3}", "i")
HotKeySet("{numpad4}", "o")
HotKeySet("{numpad5}", "u")
HotKeySet("{ESC}", "_Quit")

;Idle around
While 1
    Sleep(50)
WEnd

;Functions
Func a()
    Send("a")
EndFunc   ;==>a

Func e()
    Send("e")
EndFunc   ;==>e

Func i()
    Send("i")
EndFunc   ;==>i

Func o()
    Send("o") 
EndFunc   ;==>o

Func u()
    Send("u")
EndFunc   ;==>u

Func _Quit()
    Exit
EndFunc   ;==>_Quit

Share this post


Link to post
Share on other sites

This script will run and exit immediately. Include a loop so it checks continuously.

But maybe using HotKeySet() is better..?

;Set hotkeys:
HotKeySet("{numpad1}", "a")
HotKeySet("{numpad2}", "e")
HotKeySet("{numpad3}", "i")
HotKeySet("{numpad4}", "o")
HotKeySet("{numpad5}", "u")
HotKeySet("{ESC}", "_Quit")

;Idle around
While 1
    Sleep(50)
WEnd

;Functions
Func a()
    Send("a")
EndFunc   ;==>a

Func e()
    Send("e")
EndFunc   ;==>e

Func i()
    Send("i")
EndFunc   ;==>i

Func o()
    Send("o") 
EndFunc   ;==>o

Func u()
    Send("u")
EndFunc   ;==>u

Func _Quit()
    Exit
EndFunc   ;==>_Quit
thx for your time <_<

i tried modify the code and i want it to write text not just letters, it wont work :/

Share this post


Link to post
Share on other sites

?

Just change Send("a") with Send("your text")

It HAS to work.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

?

Just change Send("a") with Send("your text")

It HAS to work.

No ;/ Works fine if i dont use enter, I want spaces between the words <_<

ERROR :

Func hej neger()

Error badly formatted "func" statement

Code :

;Set hotkeys:

HotKeySet("{numpad1}", "hej neger")

HotKeySet("{numpad2}", "e")

HotKeySet("{numpad3}", "i")

HotKeySet("{numpad4}", "o")

HotKeySet("{numpad5}", "u")

HotKeySet("{ESC}", "_Quit")

;Idle around

While 1

Sleep(50)

WEnd

;Functions

Func hej neger()

Send("hej neger")

EndFunc ;==>hej neger

Func e()

Send("e")

EndFunc ;==>e

Func i()

Send("i")

EndFunc ;==>i

Func o()

Send("o")

EndFunc ;==>o

Func u()

Send("u")

EndFunc ;==>u

Func _Quit()

Exit

EndFunc ;==>_Quit

Edited by newb2007

Share this post


Link to post
Share on other sites

<_<

You can't use spaces in a function name, dude...

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

<_<

You can't use spaces in a function name, dude...

look at my name dude :)

hmm, is there any other way?

If you load a txt file automatic, take the first line copy that and have a hotkey for paste?

Edited by newb2007

Share this post


Link to post
Share on other sites

look at my name dude :)

hmm, is there any other way?

Well... don't use spaces <_<

Use a _ instead.

Share this post


Link to post
Share on other sites

Well... don't use spaces <_<

Use a _ instead.

If there is no other none complicated way (for you) than this will work more than fine :)

thx again..

Share this post


Link to post
Share on other sites

If there is no other none complicated way (for you) than this will work more than fine :)

thx again..

What? <_<

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

What? <_<

I meant, for me pretty much anything is complicated.

If i only say complicated i refer to what i belive is complicated.

LOL..Nnevermind thx man :)

Edited by newb2007

Share this post


Link to post
Share on other sites

LOL this thread is hilarious. Maybe it's the beer talking.

There's no way to avoid spaces, though. Either you have to use those annoying underscores --> "_"

or you can leave spaces out and WriteLikeThis

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  
Followers 0