Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Easy Automation AHK - Modular Automation script - Beta


  • Please log in to reply
96 replies to this topic
specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
Easy Automation AHK
An Any Input, Any Output, Anyone Can Use Automation Application
AutoHotKey Basic, tested on Win XP SP3 and Win XP Tablet Edition

The AutoHotkey forums are full of terrific scripts written and shared by AHK user. Easy Automation AHK provides a way to bring all those scripts together. By using modules the user can select any input and combine with any command to create subroutines. Users can create their own custom modules to share with the community.

**********************New Download Link 5/20/2014 - Easy_Automation_AHK_v0.9.02c.zip**********************
I believe this is the last version I uploaded but it is not for AHK_L. Most of the script should be ok but some modules will not work. I'll try to post the AHK_L version soon.

View a Quick Start Tutorial here, demos can be found toward bottom of post.

The main component, EasyAuto.ahk runs in the background allowing you to have access to your subroutines all the time. There is even an option to start it with your computer. EA_SC_Catch is a secondary automation script allowing shortcuts and voice commands to run subroutines. The third major component is EasyAutoEdit where you build and add the subroutines to the other scripts.

Using it is simple, Run EasyAutoEdit.ahk. Choose a input method from the "Input" drop down list, add the relevant information and click use, then do the same from the "Commands" drop down list. When done there should be a complete subroutine in the main window. Click the test button if desired to test the subroutine before committing it to your script. Click "Create" to start using the subroutine and auto-start Easy Automation AHK, your subroutines are immediately available for use.
EAAHK.gif

Input methods included are,
Click Remote - On screen virtual remote control
HID Devices - RF Remotes, Joysticks, Game Controllers...
Hot Keys - Up to three modifiers
Hot Strings - For string replace or subroutine labels
Launch Pad - A set of buttons to launch labels
Mouse Gestures - Run a subroutine with the flick of the wrist
Desktop Shortcut - For current user or all users
Timer Labels - Subroutines to run from a timer
USB-UIRT IR Receiver - Use any IR remote control to run subroutines
Voice Commands - Tell your computer what you want it to do


Included command modules,
Cmd AHK Commands -Insert AHK Commands
Close Active Window
Close App
Dell Projector IR - Example of controlling external equipment
If Win Active-Not Active - With options such as Activate or Return
If Win Exist-Not Exist
Key, Mouse, Joystick - Send buttons or mouse events
Media Player Classic HC - Uses HTTP Interface
Mouse Moves - To a point on screen or relative to current position
Open File or Application - Run any program or open by file association
Open Folder
Play Sound
Power - Suspend, Hibernate, Log Off or Shut Down your computer
Mouse Macros - Record a series of mouse moves and clicks
Run AHK Script - Quick access to your favorite scripts
Speech - Careful what you say to your computer, it can talk back
System Volume XP - Control Win XP Mixer
Text Input - Insert blocks of text anywhere
Timer - Create or stop a timer for you Timer Label input module
Transmit/Learn IR - With the USB-UIRT Library
VLC Media Player - Uses HTTP Interface
Web Page - Quickly access your favorite web pages
WinAmp - Uses the WinAmp Library
X10 CM15a Home Control - Control lights from your computer

Although it can be ran from anywhere I suggest unzipping the folder into your AutoHotKey folder. Then copy the included libraries into your AHK lib folder. For the final release I'm working on a compiled installer that will prompt the user to install AHK if it's not found then copy all the file into place.

The keyword is "Modular" Anyone can build modules for Input or Commands without having to edit the main files. Template modules are included in the "Misc" folder to use as a guide. Simply place the new modules in the corresponding folder and EasyAutoEdit reads them upon start up and adds them to the drop down lists. Place a help file of the same name in the "Help" folder and Easy Automation AHK Help automatically reads it and adds it to the help document.

I see this as a way to cut down on the many post in the help forum asking for scripts to run games. Command modules could be made for any game and the user could then select any input method to control the game. But, I don't play any of those games so I haven't supplied any game modules.:?

I started on this project the first of December, now it's April 22 and almost ready to be released. I used this as a AHK learning project and it has forced me to learn a lot in a relatively short time. Because of this I'm sure there is much of it that could be improved, and likely much that could have been much simpler. So if you have any suggestions for improvement please let me know, but remember this was a learning experience so be nice. :)

It is pretty much complete except for a lot of help file documentation. Also every time I go through every module from start to finish I find little things I overlook before, so I thought I should get some beta testers to help me find and fix other hidden problems before calling it V1.0 and declaring ready for public use.

For example, the first module I started with and ironically the last module finished, HID Devices is still a little buggy and so far I can get it to only recognize one device at a time.

So except for some documentation it's ready for tryouts. Let's see how creative you guys can get and start building some modules. :D

Module Demos,
Using HID devices to control media players
Text Input using Launch Pad

Known issues with current release:
Latest release has a bad bug in the test function. Do not use the test function until the next release is out.
The test function is not restoring the EasyAuto.ahk file causing all previous work to be lost.

Edit April 23 12:15pm: v0.9.01.a uploaded
Fixed Dock problem
Replaced ControlSend with GuiControl to Input and Command information windows
Edit April 23 12:50pm: v0.9.01.b uploaded
Added missing Voice Command library
Fixed error sending to EasyAutoEdit from modules needing installed sdk, dll, ect.
Edit April 24 8:20am: v0.9.01.c uploaded
Fixed Click Remote and Launch Pad sending to wrong windows
Fixed error checking for SAPI 5.1 installation
Fixed file menu module header reading
Edit April 27 1:40am: v0.9.02a uploaded
Fixed Allow only 1 checked list view item.
Changed EasyAutoEdit to be able to start directly without Start.ahk.
Edit May 5 2:30am: v0.9.02b uploaded
Fixed error when testing commands with certain modules.
Other minor bug fixes.
Edit May 5 6:45pm: v0.9.02c uploaded
Fixed command modules closing file menu modules.
Fixed import of help files along with new modules.[/b]

Lucid_Method
  • Members
  • 147 posts
  • Last active: Dec 06 2014 08:39 AM
  • Joined: 19 Apr 2010
Impressive specter :-) It looks like this tool has a lot of potential.

I just tried running this and I have a note that may make this easier for newer users - you currently have it setup to where the user needs to copy your lib files to their standard library before executing. As I just wanted to test w/o altering my library, I had to add the include references to EasyAutoEdit.ahk
#Include lib\docka.ahk
#Include lib\EAEDefFunction.ahk
#Include lib\EAEDefLabel.ahk
#Include lib\EAEDefShortcuts.ahk
#Include lib\AHKHID.ahk
#Include lib\MCI.ahk
#Include lib\MouseGestures.ahk
#Include lib\MPCHTTP.ahk
#Include lib\USBUIRT.ahk
#Include lib\VLCHTTP.ahk
#Include lib\Winamp.ahk
#Include lib\X10CM15a.ahk

Also you're missing the definition for Dock_Toggle(). I added this just to get it to startup:
Dock_Toggle(TF)
{
Return 
}

Posted Image
Macro Everything
Lucid_Method Index

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
Since most of the help files that still are not done are the instructions for use, here is a quick start tutorial.

It is suggested that you unzip the folder into your AutoHotKey folder. Normally, C:\Program Files\AutoHotkey\Easy Automation AHK.

Copy the files from the Easy Automation AHK\lib folder into the AutoHotkey\lib folder. If you don't want to copy all the libraries I suggest at least copying DockA, EAEDefFunction.ahk, EAEDefLabel.ahk and EAEDefShortcuts.ahk as these are Required libraries for EasyAutoEdit.

To get started double click EasyAuto.ahk, it will open in the background. The smiley icon will be in your system tray. Press the hot key "Control+F12" to open EasyAutoEdit which is a gui window where you make all your subroutines.

When EasyAutoEdit opens the two client windows at the bottom will be empty.
Posted Image
Start by selecting an Input Method from the Input drop down list. In this example were going to use HotKey Create. The Input HotKey Create module will open and dock in the bottom left corner.

Posted Image


Choose any modifiers you wish to use from the first three drop down list and a key from the fourth drop down list. You can either choose a key from the list or type one in the combo box. You can enter an optional description of the label in the description box.
Posted Image
Click the "Use This HotKey" button and the HotKey is sent to the main EasyAutoEdit window.


Chose the module "Open File or Application" from the Commands drop down box.
Posted Image
Browse to your AutoHotKey folder and chose the file "AutoHotkey.chm" Click "Open This File" to send it to the main EasyAutoEdit window. You have now created a complete subroutine.


To test your subroutine before committing it to the main file, check the box beside the Test button to activate it. Click the Test button and a Message Box will pop up to confirm running the test.
Posted Image
Click ok and you will have 60 seconds to test your new subroutine. If the test was successful it will terminate immediately, if not it will terminate when time is up.


To save the label check the box beside the Create Label button to activate it. Click the Create Label button and the label is written to the EasyAuto.ahk file which is then reloaded making your label ready for use.
Posted Image
With EasyAuto.ahk running in the background, anytime you use your hotkey the help file will open.


If you should choose a function as an input instead of a label, EasyAutoEdit will automatically format the command as a function.
Posted Image


And of course you can stack labels and commands in your subroutine.
Posted Image

The modules which require an SKD, DLL or some other extra file to run are set to not open if the required files are not installed on your computer. Otherwise, any input module can be combined with any command module to build custom subroutines while learning AHK from example. :p

Lucid_Method
  • Members
  • 147 posts
  • Last active: Dec 06 2014 08:39 AM
  • Joined: 19 Apr 2010
I would either search your library for it to include with your code or just comment out the reference in your code if it isn't being used. I just added that to the bottom of EasyAutoEdit.ahk so it would launch without the error
Posted Image
Macro Everything
Lucid_Method Index

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
Still has me a bit worried as to why it doesn't cause problems on my machine. Makes it kinda hard to know if I'm getting everything working correctly when it only works on my computer and not others.

Just out of curiosity, and the fact that I'm still pretty fuzzy on this whole include/library call thing. Is it possible that problem is that you included it instead of putting it in the library?

Another problem including the libraries will cause in the future is the EA format definition libraries. What they do is let's the input module tell the editor to format as either a label or function and write to either EasyAuto or the Short Cut Catch. These are all called at the beginning of the EasyAutoEdit script with #includeEAdef or something like that (I'm not at home where I can check. I figure that users writing input modules may need to make their own definition libraries so to keep from having to edit the editor each time a new library is made I came up with a long work around.

The Start.ahk file reads a folder of files that are named for the library calls and no extension. Something like EADefLabel(Edit3). It then writes the file names to a script EADef.ahk and starts EasyAutoEdit which then includes EADef.ahk. This way if a person needs a new format definition library he need only make a new file named the library call and put it in the folder. When EasyAutoEdit is started the file name is read and the library is called. Did any of that make sense?

Anyway that's one of the thing I'm hoping to be able to simplify someday.

So after you got it started how did it work for you? Did the modules dock correctly? Did you have any problems getting it to put together the subroutines? Any comments on how it functions?

I do appreciate the input. Thanks

Lucid_Method
  • Members
  • 147 posts
  • Last active: Dec 06 2014 08:39 AM
  • Joined: 19 Apr 2010
Everything seemed to load fine. I haven't had time to play with it very long, however it seems like a quick tutorial from you with screen shots and a simple examples of doing something with the tool would be useful to getting started. It looks like there are a lot of options and features, I'm just not clear on the work flow yet.

I'll be glad to help you test this project. I'm building a few tools for work, one of which being a macro recorder system and I'm looking for new approaches to what has turned out to be a larger task than expected... Your modular approach might be along the lines of what I need to try

As for the Dock_Toggle() call, that function is located in dock.ahk, which wasn't part of the library you distributed but is likely in your pc's library. For include files / standard library questions I recommend reading the manual page for a clear explanation as that is going to be important in doing what you are describing.

I can tell you from my experience thus far, a great way to test out your code before releasing to a group is to use a copy of Virual-PC with just AHK installed on the virtual pc. Before you release you transfer to the virtual computer and try to run, you'll get the kind of error messages I received where it's trying to run earlier. It helps determine which files you linked to things on your pc versus your release. For a rather complicated project like this I like to have all of the include files together and assume the user has nothing installed, that way your tool works right out of the box
Posted Image
Macro Everything
Lucid_Method Index

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
Dock.ahk that's the problem. I switched from Dock to DockA at the very beginning of the project. There must still be something from Dock in my code I over looked.

The reason I stripped this down to a clean release level this weekend was to install on this tablet I'm using while I'm working out of town. It will be the first time I've tried it on any computer besides the one I wrote it on. I'm getting ready to try it now. I appreciate the input.

Edit:
Yep, that was the problem. When I loaded it on this computer it was really buggy but the section of script that was causing the problem was left over from long ago. It seems to run smooth on this Tablet now.

Thanks for figuring out it was Dock. I don't know if I could have found that by myself.

As you suggested I'm going to edit my second post and turn it into and example with some screen shots.

Frankie
  • Members
  • 2930 posts
  • Last active: Feb 05 2015 02:49 PM
  • Joined: 02 Nov 2008
Looks interesting. I'd say it's friendlier than a text editor for a non-programmer.

There's a button under "Help" with no text, I clicked on it and lost my current project. Here's a screen shot.
[img]http://img812.imageshack.us/img812/8285/img0001ix.jpg[/img] (Edit: Image quoted next post)
aboutscriptappsscripts
Request Video Tutorials Here or View Current Tutorials on YouTube
Any code ⇈ above ⇈ requires AutoHotkey_L to run

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007

There's a button under "Help" with no text, I clicked on it and lost my current project. Here's a screen shot.
Posted Image


Oops, that's my reload button for when I'm working on the script. I forgot to delete it before posting this last update.

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
Added a compiled installer that automatically copies Easy Automation AHK files to the proper folders, including library files.

It will also prompt to download and install AutoHotkey for those who don't have it installed.

See the first post to download the installer or source.

blue99
  • Members
  • 4 posts
  • Last active: Apr 27 2011 08:13 PM
  • Joined: 12 Apr 2011
Hi;
just downloaded the compiled Easy Automation,
installed it, and everything seemed OK,
but when I try to open it ( Ctrl+F12), I get this error message:

Posted Image

I run win xp sp3
installed AHK 1.0.97.02


appreciate your help,

thanks;

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
Hmm, there is a period at the end of that line. I've fixed that line in the script and re-uploaded it. I also re-upped the source files.

There seems to be things that work just fine on this computer but don't on others. If you don't mind please re-download ,try it again and let me know how it works.

Thanks for pointing out the bug.

blue99
  • Members
  • 4 posts
  • Last active: Apr 27 2011 08:13 PM
  • Joined: 12 Apr 2011
Thanks for the reply;

I did download the Installer version again,
and reinstalled it using (Easy Automation AHK Installer.exe)

but the result is same, I get the same error.

not sure if I had to reinstall,or uninstall the whole thing first, AHK I mean;

thanks.

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007

not sure if I had to reinstall,or uninstall the whole thing first, AHK I mean;


This install should not change anything with your current AHK install except for adding some library files. Other than that it only copies a folder named Easy Automation AHK into your AHK folder. To be clear, once AutoHotkey is installed on your system installing or deleting this script should not affect it.

As I understand it, when you copy over an existing folder it should overwrite the contents but it sounds like it did not.

Try deleting the Easy Automation AHK folder and installing again. The folder should be found at C:\Program Files\AutoHotkey\Easy Automation AHK. Just delete the entire folder, it will be reinstalled when you run the installer again.

The other thing you can do if you don't want to use the installer is download the source files and copy them into your AutoHotkey folder. The source files unzip into a folder named Easy Automation AHK so you can just copy the entire folder.

I downloaded and checked the zip file and the corrected script is there. When you reinstall using the compiled version it should restart EasyAuto.ahk but if you copy the new folder be sure you restart the script your self.

blue99
  • Members
  • 4 posts
  • Last active: Apr 27 2011 08:13 PM
  • Joined: 12 Apr 2011
OK, Thanks;

I deleted the folder and reinstalled the add on,
Now it is working;

thanks a alot.