jacksonm1234 Posted November 15, 2010 Share Posted November 15, 2010 Hello all, I am trying to explore AutoIT in the hopes of moving away from AutoHotKey (I hate AHK syntax!), but I have some questions. In AutoIT, can I have hotkeys that are exclusive to certain programs? For example, I want to be able to have shift+space do something when one program is active, but do nothing in every other program. What would the code look like to do that? Also, can AutoIT do string replaces (again, only in whatever programs I choose)? For example, in notepad, I'd like to be able to type "brb" and have it automatically be replaced by "be right back", but have "brb" mean nothing in every other program. How can I do that? I'm not trying to start some comparison war here. If AutoIT can't do these things (but I'm sure it probably can), just tell me. Thanks in advance! Link to comment Share on other sites More sharing options...
JohnOne Posted November 15, 2010 Share Posted November 15, 2010 Welcome to the forums. The question "What would the code look like to do that?" is equal to "make this code for me" which folk arnt best fond of around here. I can say that both situations you are after are doable with autoit3 and I can also say that if you put in a little effort you will get a lot of help. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
jacksonm1234 Posted November 15, 2010 Author Share Posted November 15, 2010 Fair enough. Would it be reasonable instead of having someone give me the code to at least talk me through it? I have done some searching on these forums and in the documentation, but am coming up blank. I understand how to set and "unset" hotkeys, but my main problem is I dont know how to get my script to sit there and wait for me to perform a certain action inside a certain program, and then go back to waiting. I'd like to have multiple hotkeys for multiple programs inside one script, kinda like I do today with AHK. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted November 15, 2010 Share Posted November 15, 2010 You would probably use either of these two functions, WinExists, or, ProcessExists; and a conditional statement, such as this, If.... Of course, this function would certainly be used also - HotKeySet.Welcome to the Forum, Good Luck! - 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...
Moderators Melba23 Posted November 15, 2010 Moderators Share Posted November 15, 2010 jacksonm1234, Welcome to the AutoIt forum. can I have hotkeys that are exclusive to certain programs?Certainly. Look at GUISetAccelerators in the Help file. can AutoIT do string replaces?You can do this by using the HotStrings UDF. I am not sure if this is automatically limited to a single app, but you can easily make it so programatically by checking if the app GUI is active. I hope this helps. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JohnOne Posted November 15, 2010 Share Posted November 15, 2010 You might also want to look at by yashied AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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