JuanLopez Posted January 19, 2017 Posted January 19, 2017 (edited) Okay ive been googling and looking through here site:autoitscript.com and I cant find the answers not sure if im just not using the right keywords or what (im new to autoit). What I am trying to do is set a HotkeySet and when that key is pressed to send 3 separate commands, First (ctrl+alt+shift+e) / 2nd, THEN send Mouseclick(181, 305, 1)/ 3rd, THEN send('2') / So with a single key would like it to function 3 separate commands/scripts. teh script i have works for the first command, I just dont know how to append the 2nd and 3rd to it. #include <AutoItConstants.au3> HotKeySet("{ESC}", "AltF5") Func AltF5() If WinActive('Program X') Then Send('^!+e') MouseClick($MOUSE_CLICK_LEFT, 181, 305, 1) Send('2') EndFunc Edited January 19, 2017 by JuanLopez
Moderators JLogan3o13 Posted January 19, 2017 Moderators Posted January 19, 2017 Look at the example for If...Then in the help file. You just need to perform the actions one after another: If WinActive("My Program") Then ;Perform Step 1 ;Perform Step 2 ;Perform Step 3 EndIf "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!
zone97 Posted January 19, 2017 Posted January 19, 2017 #include <AutoItConstants.au3> HotKeySet("{ESC}", "AltF5") Func AltF5() If WinActive('Program X') Then Send('^!+e') MouseClick($MOUSE_CLICK_LEFT, 181, 305, 1) Send('2') EndIf EndFunc Spoiler WinSizer 2.1 (01/04/2017) - Download - [ Windows Layout Manager ]Folder+Program (12/23/2016) - Download - [ USB Shortcut Creator ]
JuanLopez Posted January 20, 2017 Author Posted January 20, 2017 1 hour ago, JLogan3o13 said: Look at the example for If...Then in the help file. You just need to perform the actions one after another: If WinActive("My Program") Then ;Perform Step 1 ;Perform Step 2 ;Perform Step 3 EndIf Thanks I tried that and it didnt work cause i left out the Endif, but I have other if winactive hotkeysset that are without and they worked but they also arent double commands. So thanks. 46 minutes ago, zone97 said: #include <AutoItConstants.au3> HotKeySet("{ESC}", "AltF5") Func AltF5() If WinActive('Program X') Then Send('^!+e') MouseClick($MOUSE_CLICK_LEFT, 181, 305, 1) Send('2') EndIf EndFunc Thanks also, that worked my issue was I left out and if. Also do you know why the hotkeyset key I chose for instance is the letter "E" locks up meaning that I cant use it for anything else but that hotkeyset.
zone97 Posted January 20, 2017 Posted January 20, 2017 I'm confused? Are you meaning the hotkey you set? {ESC} or the hotkey your sending? "^!+e'" Spoiler WinSizer 2.1 (01/04/2017) - Download - [ Windows Layout Manager ]Folder+Program (12/23/2016) - Download - [ USB Shortcut Creator ]
JuanLopez Posted January 21, 2017 Author Posted January 21, 2017 8 hours ago, zone97 said: I'm confused? Are you meaning the hotkey you set? {ESC} or the hotkey your sending? "^!+e'" the question is answered already but I was asking how to make one hotkey {ESC} perform multiple shortcuts back to back.
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