beboard Posted September 2, 2010 Share Posted September 2, 2010 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. Link to comment Share on other sites More sharing options...
czardas Posted September 2, 2010 Share Posted September 2, 2010 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. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
beboard Posted September 2, 2010 Author Share Posted September 2, 2010 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. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted September 2, 2010 Share Posted September 2, 2010 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. Link to comment Share on other sites More sharing options...
beboard Posted September 2, 2010 Author Share Posted September 2, 2010 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 Link to comment Share on other sites More sharing options...
ludocus Posted September 2, 2010 Share Posted September 2, 2010 You should use: Send('^!s') ;^ = CTRL ;! = ALT ;s = s ludocus Link to comment Share on other sites More sharing options...
somdcomputerguy Posted September 2, 2010 Share Posted September 2, 2010 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now