Sign in to follow this  
Followers 0
cjslim101788

Newbie question (Multiple function on one run)

8 posts in this topic

Hi Autoit members,
 
This has probably been asked before, but i don't know how to search for it in the help and support / script page.
 
Basically, I have a list of combination keys to run, and i'd like to run 3 at the same time, using the function keys. If I code with 1 function only, it works, but when i add more, it doesn't seem to work. Here's my sample code (I'd probably need advice on coding and improvement as well on it)
 
Thank you!

Global $fPaused = False

HotKeySet("{F4}", "Func1")
HotKeySet("{F3}", "Func2")
HotKeySet("{F3}", "Func3")

While 1
    Sleep(100)
WEnd

Func Func3()
HotKeySet("{F2}")
MouseClick("left")
HotKeySet("{F2}", "Func3")

EndFunc

Func Func2()
HotKeySet("{F3}")
MouseClick("right")
HotKeySet("{F3}", "Func2")

EndFunc

Func Func1()
HotKeySet("{F3}")
Send("{ENTER}") ;
HotKeySet("{F3}", "Func1")

EndFunc

 

Share this post


Link to post
Share on other sites



Hi Mbalzeshari,

Thank you for the reply! That's new info. Thanks for it. Okay, the script I want to make is basically I have a website I need to fill up info in, and there is a drop down box. So there are 3 things I usually pick but it's a long list and a lot of drop downs. Using Autoit, i can simply run a function to select all the drop downs i need in a row, but there's 3 of it that i'd like to save.

Being able to cut down 8-10 clicks to pressing F4 using AutoIt script is really good, but being able to cut 3 sets of 8-10 clicks using F2, F3 and F4 is even much better.

Thanks again!

Share this post


Link to post
Share on other sites

Have you looked into the IE functions in the help file? I guarantee it will be much easier for you than automating a bunch of clicks and sends. It will also allow you to do everything you want with that page in a single script.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Hi JLogan,

Thanks for the reply. I'll have a look into IE functions - That's something new to me. Could you kindly direct me where I can see that?

Thank you!

Edited by cjslim101788

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Could you kindly direct me where I can see that?

In the Help file. The UDF (User Defined Function Reference) section.

Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Thank you ComputerGuy.

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