clevername47 Posted June 14, 2010 Share Posted June 14, 2010 I've written a system similar to Macro Express using AutoIt (and some C#). It allows you to define scripts and programs to be run when hotkeys are pressed or when windows or programs matching certain criteria become active or are created. The code that monitors windows, listens for hotkeys, and runs commands is written in AutoIt, and the interface for defining actions is written in C# (screenshot attached). I think I've gotten it working pretty well - that's not to say that there aren't limitations but I make good use of it every day. Is there any interest in seeing something like this? Link to comment Share on other sites More sharing options...
gseller Posted June 14, 2010 Share Posted June 14, 2010 I've written a system similar to Macro Express using AutoIt (and some C#).It allows you to define scripts and programs to be run when hotkeys are pressed or when windows or programs matching certain criteria become active or are created. The code that monitors windows, listens for hotkeys, and runs commands is written in AutoIt, and the interface for defining actions is written in C# (screenshot attached).I think I've gotten it working pretty well - that's not to say that there aren't limitations but I make good use of it every day. Is there any interest in seeing something like this?Are you going to add the code or a link or something? Link to comment Share on other sites More sharing options...
hat Posted June 15, 2010 Share Posted June 15, 2010 Code or link? Link to comment Share on other sites More sharing options...
clevername47 Posted June 15, 2010 Author Share Posted June 15, 2010 (edited) Here is the system. How to use and install:Copy all files in the zip file to a folder of your choice (I use C:\auto, so user scripts go in C:\auto and the system files go in C:\auto\System.)Edit the file System\__config.au3 and change all the paths to be correct on your system. These have to be literal strings and not @AutoItExe, etc. since they will be read by the C# editor program.To start things off, you can either start the editor program (AutoActionsEditor.exe) and click "Restart script and apply changes" or run the script System\auto.au3. Then once it is running you should be able to hit Win+Z to bring up the actions editor or Win+X to create a new script or edit an existing script. If you use Win+X, don't type the folder name or the .au3 extension. It will open up SciTE so if you put some code in there and save your script, you can then use the actions editor to map it to a hotkey.Some of the included scripts (google.au3, web.au3) have the path to Firefox hard-coded in them. This is because I don't want to set Firefox as my default browser at work, so you could probably improve on those. I find it very handy to be able to hit Win+G to open up a google search prompt though.Let me know if you have any trouble.auto.zip Edited June 17, 2010 by clevername47 Link to comment Share on other sites More sharing options...
EnderWiggin Posted June 16, 2010 Share Posted June 16, 2010 Here is the system. How to use and install:Copy all files in the zip file to a folder of your choice (I use C:\auto, so user scripts go in C:\auto and the system files go in C:\auto\System.)Edit the file System\__config.au3 and change all the paths to be correct on your system. These have to be literal strings and not @AutoItExe, etc. since they will be read by the C# editor program.To start things off, you can either start the editor program (AutoActionsEditor.exe) and click "Restart script and apply changes" or run the script System\auto.au3. Then once it is running you should be able to hit Win+Z to bring up the actions editor or Win+X to create a new script or edit an existing script. If you use Win+X, don't type the folder name or the .au3 extension. It will open up SciTE so if you put some code in there and save your script, you can then use the actions editor to map it to a hotkey.Some of the included scripts (google.au3, web.au3) have the path to Firefox hard-coded in them. This is because I don't want to set Firefox as my default browser at work, so you could probably improve on those. I find it very handy to be able to hit Win+G to open up a google search prompt though.Let me know if you have any trouble.Great idea. Looking forward to trying it out. Downloaded, and setting up. Cheers Link to comment Share on other sites More sharing options...
WeiHeXie Posted June 17, 2010 Share Posted June 17, 2010 ControlAtPos.au3 not find? Link to comment Share on other sites More sharing options...
clevername47 Posted June 17, 2010 Author Share Posted June 17, 2010 (edited) ControlAtPos.au3 not find? Oops, here you go. I think this is just a renamed copy of _ControlGetHandleByPos(). I'm not sure why I did that - it was a long time ago.I've also updated the main zip file above to include this file.ControlAtPos.au3 Edited June 17, 2010 by clevername47 Link to comment Share on other sites More sharing options...
WeiHeXie Posted June 17, 2010 Share Posted June 17, 2010 Thank you,updated! Link to comment Share on other sites More sharing options...
clevername47 Posted June 17, 2010 Author Share Posted June 17, 2010 Thank you,updated!The code in newedit.au3 that uses that function doesn't work very well anyway. It's supposed to get the name of the currently selected command when you run newedit.au3 while the editor program is active. I'll try to rewrite it sometime but I am going to be out of town for about the next week. Link to comment Share on other sites More sharing options...
EnderWiggin Posted June 18, 2010 Share Posted June 18, 2010 (edited) Wanted to report back on this wonderful project: I had no trouble getting this to work, even though I'm a newbie here and just learning to code. The nice thing about this for a total beginner like me: it allows me to learn very small coding ideas in a useful context. For example, I can learn to use the WinMove() function to accomplish something I've been dying to implement on my desktop: a hotkey system for resizing and moving windows to fixed locations. The coding is very obvious and since I've done a specific case (my two monitors, monitor 1 is 1920X1200 and monitor 2 is in portrait position and 1200X1600) it may not be helpful to show here. But maybe the idea of adding a quick window partitioner will be useful to someone. Now I can just hit alt 1-6 to send to any of my 6 fixed 'mini-monitors.' Very nice for multi-tabling poker, editing side by side documents, or watching multiple videos at once. Next I'm going to work on adding some file management basics that I repeat a lot. I'll report back in the same vein. Thanks again for this wonderful project. I see I'm the third person to give it 5 stars. I love it.window movement command example.zip Edited June 18, 2010 by EnderWiggin Link to comment Share on other sites More sharing options...
clevername47 Posted June 23, 2010 Author Share Posted June 23, 2010 Thanks for the comments Ender. Anything you'd change about the system? Link to comment Share on other sites More sharing options...
MeMeMe Posted August 13, 2010 Share Posted August 13, 2010 This looks very nifty. Before I download it, has it been updated? 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