Sign in to follow this  
Followers 0
novrizal1991

Help me make a script

6 posts in this topic

Hello,

Can u help me to make a script autoit ?

i just want to make a script auto it

- i press f1

- wait 2 seconds

- and script will press TAB key

sorry, I'm just a newbie who wants to learn autoit T____T

Share this post


Link to post
Share on other sites



"Help me make a script"

Sure, but you have to read up on the functions in the help file, deal?

Heres how you write a simple function

Func _myfunc()
    ;do some stuff, like run other functions or something
EndFunc

And heres how you call that function to do its stuff

_myfunc()

A loop can be used to keep a script running until it is called upon to do something, like this

While 1
    Sleep(10)
WEnd

You want to be looking at functions

HotKeySet()

Send()

Sleep()


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

While 1=1

xxxxxxxxxxxxx

Sleep(1000)

Send("{F1}")

Sleep(2000)

WEnd

i want to

xxxxxxxxxxxxx = if i press Key F1 then press TAB

or use function if else ?

how the code ?

sorry for my bad english :graduated:

Share this post


Link to post
Share on other sites

or use function if else ?

how the code ?

:graduated:

Try:

Type this word into Scite without the quotation marks.

"HotKeySet"

Press the special function key F1


Share this post


Link to post
Share on other sites

While 1=1

xxxxxxxxxxxxx

Sleep(1000)

Send("{F1}")

Sleep(2000)

WEnd

i want to

xxxxxxxxxxxxx = if i press Key F1 then press TAB

or use function if else ?

how the code ?

sorry for my bad english :graduated:

This should be it:

HotKeySet('{F1}', '_myFunc')

Func _myFunc()
    Send('{TAB}')
    ConsoleWrite('TAB Pressed!')
EndFunc

While 1
    Sleep(10)
WEnd

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