Jump to content

Newbie question (Multiple function on one run)


Recommended Posts

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

 

Link to comment
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!

Link to comment
Share on other sites

  • Moderators

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.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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...