Sign in to follow this  
Followers 0
beboard

A few newbie questions

7 posts in this topic

Hi everybody,

I'm just learning to use AutoIT and I have some questions I can't seem to find the answer for

I was wondering if it would be possible to assign some shortcuts keys to some macros... something like

CTRL+SHIFT+H
mouseclick ... 
mouseclick ... 
send ...
mouseclick ..


CTRL+SHIFT+I
mouseclick ... 
send ...

I need this to run as an application and basically i just want it to send some mouseclicks depending on the shortcuts keys.

Also is there some way to make the script take different actions depending on the active window ?

I'm trying to make a script that will work with an excel macro and basically the excel macro should display a message box with different titles. Can I make the autoIT script read the title of this message box and take appropriate action ?

Thank you in advance for your replies, any help will be much appreciated.

Share this post


Link to post
Share on other sites



You can use HotKeySet to create hot keys (to run a function). You can check if a window or messagebox is open using WinExists. You can get information such as window title/text using AutoIt Window Info tool (found in the start menu). You can read text from a window using WinGetText. I suggest you start by trying a simple project to learn how to use each of these functions and the AutoIt Window Info tool. There are also some Excel UDFs that could be useful, but I don't know much about them.

Share this post


Link to post
Share on other sites

You can use HotKeySet to create hot keys (to run a function). You can check if a window or messagebox is open using WinExists. You can get information such as window title/text using AutoIt Window Info tool (found in the start menu). You can read text from a window using WinGetText. I suggest you start by trying a simple project to learn how to use each of these functions and the AutoIt Window Info tool. There are also some Excel UDFs that could be useful, but I don't know much about them.

Could you please give me an example on how to assign a hotkey to a series of mouse clicks ? It would solve most of my problems ;) thanks for the reply

While 1
    MouseClick("left", 384, 544, 1)
    MouseClick("left", 338, 663, 1)
    Send("install")
    MouseClick("left", 481, 552, 1)
    MouseMove(550, 592)
    MouseDown("left")
    MouseMove(576, 595)
    MouseUp("left")
    MouseClick("left", 618, 545, 1)
    MouseMove(553, 615)
WEnd

How do I make my script do this when I press Alt+Ctrl+s ? I have more codes like this and I want to assign to each of them a hotkey.

Share this post


Link to post
Share on other sites

There is examples in the Helpfile for just about every command.


- 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

There is examples in the Helpfile for just about every command.

I was trying for so long and thought it's no possible even with the help file, I just noticed I was using the wrong syntax... it's working now ;)

Share this post


Link to post
Share on other sites

You should use:

Send('^!s')
;^ = CTRL
;! = ALT
;s = s

;)

ludocus

Share this post


Link to post
Share on other sites

I was trying for so long and thought it's no possible even with the help file, I just noticed I was using the wrong syntax... it's working now ;)

Alright, glad you got it.

- 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

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