Jump to content
Sign in to follow this  
inloveofrapo

How to make script just simple type something ?

Recommended Posts

inloveofrapo

Well, how do i make, so for example i press a key ( Like shift + alt + h )

then script types :

"hi

this is my

first script

i ever made " ?

when i make more than 1 sence, i also want to know how to open a new sence ( Enter )..

I appriciate the help, please give me some !

Share this post


Link to post
Share on other sites
cppman

Well, how do i make, so for example i press a key ( Like shift + alt + h )

then script types :

"hi

this is my

first script

i ever made " ?

when i make more than 1 sence, i also want to know how to open a new sence ( Enter )..

I appriciate the help, please give me some !

HotKeySet("+!h", "SendHi")

While(1)
    Sleep(100)
WEnd

Func SendHi()
    Send("hi this is my first script i ever made")
EndFunc

Look up, Send and HotKeySet in the help file. :)

Edited by cppman

Share this post


Link to post
Share on other sites
inloveofrapo

HotKeySet("+!h", "SendHi")

While(1)
    Sleep(100)
WEnd

Func SendHi()
    Send("hi this is my first script i ever made")
EndFunc

Look up, Send and HotKeySet in the help file. :)

How do i make it press enter asswell ? :)

And how do i make more than 1 sence?

Btw, when i set all this up you typed there, in a script file, and try to use it, it types that and so on.. but dosnt type enter ( therefor i ask you how to make enter too )

And after it finished type, its like its still pressing " Shift " , why it does that?

Edited by inloveofrapo

Share this post


Link to post
Share on other sites
evilertoaster

Send Command (if zero flag) ::: Resulting Keypress

{!} ::: !

{#} ::: #

{+} ::: +

{^} ::: ^

{{} ::: {

{}} ::: }

{SPACE} ::: SPACE

{ENTER} ::: ENTER key on the main keyboard

{ALT} ::: ALT

Edited by evilertoaster

Share this post


Link to post
Share on other sites
inloveofrapo

How do i make it press enter asswell ? :)

And how do i make more than 1 sence?

Btw, when i set all this up you typed there, in a script file, and try to use it, it types that and so on.. but dosnt type enter ( therefor i ask you how to make enter too )

And after it finished type, its like its still pressing " Shift " , why it does that?

I dont get it.

Where do i find the help function about this ?

Im really new at this scripting, so do not flame me because im a newb to this ^^

I really need the help and appriciate it !

Share this post


Link to post
Share on other sites
Drew

Help file.

Anything he just said... you can probably enter it in the search in the helpfile and it will bring somethings up.

Share this post


Link to post
Share on other sites
inloveofrapo

Help file.

Anything he just said... you can probably enter it in the search in the helpfile and it will bring somethings up.

Okay, i tried this what i could now.

i tried

send{enter}

{(Enter)}

Send({Enter})

but one of them worked.. What do i have to type exactly before it press enteR?

Share this post


Link to post
Share on other sites
cppman

You just add the {'s inside the text you are sending, and it will turn it into the real symbol/keypress. So if you want to simulate "enter/return" being pressed, you would do this.

HotKeySet("+!h", "SendHi")

While(1)
    Sleep(100)
WEnd

Func SendHi()
    Send("hi this is my first script i ever made{enter}")
EndFunc
Edited by cppman

Share this post


Link to post
Share on other sites
inloveofrapo

You just add the {'s inside the text you are sending, and it will turn it into the real symbol/keypress. So if you want to simulate "enter/return" being pressed, you would do this.

HotKeySet("+!h", "SendHi")

While(1)
    Sleep(100)
WEnd

Func SendHi()
    Send("hi this is my first script i ever made{enter}")
EndFunc
Okay, thank you.

It works.

But still, i have to type alt + shift to avoid its still clicking alt/shift... What do i have to do so it dosnt hold shift/alt in ?

edit

And how do i make more than 1 func ? i mean :

Func SendHi()

Send(" xxx ")

its based on lenght how much this can type..

But how do i make the " Second " sence of " Func " so it continue ?

Edited by inloveofrapo

Share this post


Link to post
Share on other sites
evilertoaster

Func and EndFunc define a function-

HotKeySet("+!h", "SendHi")
HotKeySet("+!y", "SendYo")

While(1)
    Sleep(100)
WEnd

Func SendHi()
    Send("hi this is my first script i ever made")
EndFunc
Func SendYo()
     Send("yo")
EndFunc

If you dont want to have to press alt+shift, you can jsut make it a single key-

HotKeySet("h", "SendHi")

Share this post


Link to post
Share on other sites
inloveofrapo

Func and EndFunc define a function-

HotKeySet("+!h", "SendHi")
HotKeySet("+!y", "SendYo")

While(1)
    Sleep(100)
WEnd

Func SendHi()
    Send("hi this is my first script i ever made")
EndFunc
Func SendYo()
     Send("yo")
EndFunc

If you dont want to have to press alt+shift, you can jsut make it a single key-

HotKeySet("h", "SendHi")

Okay thanks for this.

but I also want to know.

for example.

if i make 1 func, and its too long, i cant just press enter, and continue..

Like :

Func SendHi()

Send("hi this is my first script i ever madee hfaduhfauhafduhfaduohfad uofua uohfaduohfdau -> now too long

-> this is a new sence <- ( not in the first line/sence), and this i type here <- wont come in the ->Func Sendhi() ")

Do you understand what i mean ? :)

Share this post


Link to post
Share on other sites
evilertoaster

Do you mean somthing like-

Func SendHi()
    Send("hi this is my first script i ever made{enter}")
    Send("second line{enter}")
     Send("third line")
EndFuncoÝ÷ Ù«­¢+ÙÕ¹M¹!¤ ¤(M¹ ÅÕ½ÐíQ¡¥Ì¥ÌÉѡȱ½¹±¥¹°Í¼$ÅÕ½ÐìµÀì|(ÅÕ½Ðíɽ­¥ÐÝ¥Ñ Ñ¡Õ¹Éͽɰ|°¡ÉÑȸÅÕ½Ðì¤)¹Õ¹
Edited by evilertoaster

Share this post


Link to post
Share on other sites
inloveofrapo

Do you mean somthing like-

Func SendHi()
    Send("hi this is my first script i ever made{enter}")
    Send("second line{enter}")
     Send("third line")
EndFuncoÝ÷ Ù«­¢+ÙÕ¹M¹!¤ ¤(M¹ ÅÕ½ÐíQ¡¥Ì¥ÌÉѡȱ½¹±¥¹°Í¼$ÅÕ½ÐìµÀì|(ÅÕ½Ðíɽ­¥ÐÝ¥Ñ Ñ¡Õ¹Éͽɰ|°¡ÉÑȸÅÕ½Ðì¤)¹Õ¹
Second line.

God damnit. All thoose support to get here, really a nice site, and really, thank you people who have given me some support ! I really like this ! Good job folks !

Share this post


Link to post
Share on other sites
inloveofrapo

1 question more.

I scripted one "spam" thing.

But it types low.

I got one from friend where he did it, but i cant open the script, he got a pass on it xd

But his types much fastere.

What i typed :

HotKeyset("+!l", "SendLol")

While(1)

Sleep(100)

WEnd

Func Sendlol()

Send("The sence")

What and where do i have to type something so it gets fastere to type ?

Share this post


Link to post
Share on other sites
PsaltyDS

Func and EndFunc define a function-If you dont want to have to press alt+shift, you can jsut make it a single key-

HotKeySet("h", "SendHi")

Bad example because "h" is part of what is sent within the function, which triggers the hot key for "h", recursively calls the function again..., etc.

But you knew that. :)

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
inloveofrapo

Bad example because "h" is part of what is sent within the function, which triggers the hot key for "h", recursively calls the function again..., etc.

But you knew that. :)

Yeah i found out of that ^^

Need to know how to make this script type fastere, any1 know how to fix this ?

Share this post


Link to post
Share on other sites
PsaltyDS

Need to know how to make this script type fastere, any1 know how to fix this ?

The Send functions have built-in delays that can be adjusted with the Opt() option function using SendKeyDelay and SendKeyDownDelay.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
inloveofrapo

The Send functions have built-in delays that can be adjusted with the Opt() option function using SendKeyDelay and SendKeyDownDelay.

:)

Ah okay.

So where i have to type it at this sence ?

HotKeySet("+!h", "SendHi")

While(2)

Sleep(100)

WEnd

Func SendHi()

Send("hi this is a try.")

EndFunc

Edited by inloveofrapo

Share this post


Link to post
Share on other sites
PsaltyDS

So where i have to type it at this sence ?

Somewhere before your Send functions do this:
Opt("SendKeyDelay", 1)
Opt("SendKeyDownDelay", 1)

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
inloveofrapo

Somewhere before your Send functions do this:

Opt("SendKeyDelay", 1)
Opt("SendKeyDownDelay", 1)

:)

Great, works, thanks for this support, i rlly like this :)

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  

×