User Tools

Site Tools


autohotkey

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
autohotkey [2013/03/30 17:34]
jariw
autohotkey [2013/03/30 17:54]
jariw
Line 1: Line 1:
 +Many of the JW freeware plug-ins use the window concept of a tree view to the left (with tasks arranged into containers) and a panel to the right that is specific to the task. This page contains code for [[http://​www.autohotkey.com|AutoHotkey]] for Windows on how to fully automate a task in such a plug-in.
 +
 +AutoHotkey is a script-based Windows freeware macro application that's robust and extremely powerful, although it has some learning curve to work fluently (there are also GUI frontends and other tools available to simplify tasks). However, once the basic script is set up, adding new tasks is extremely trivial. This page contains functions and scripts to get you started.
 +
 +At the start of the script, add the following standard lines: ​
 <​code>​ <​code>​
 #​NoEnv ​ ; Recommended for performance and compatibility with future AutoHotkey releases. #​NoEnv ​ ; Recommended for performance and compatibility with future AutoHotkey releases.
Line 4: Line 9:
 SendMode Input  ; Recommended for new scripts due to its superior speed and reliability. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
 SetWorkingDir %A_ScriptDir% ​ ; Ensures a consistent starting directory. SetWorkingDir %A_ScriptDir% ​ ; Ensures a consistent starting directory.
 +</​code>​
  
  
-; submenuname:​ The name of the Plug-ins submenu (where the plug-in is located) within quotes. Use ""​ for the root Plug-in menu.+Here's a general function, called //​openJWpluginwindow()//​ that will open a plug-in and selects a task from the tree list. 
 +<​code>​ 
 +; This function will open a plug-in and selects a task from the tree list. 
 +;  
 +; submenuname:​ The name of the Plug-ins submenu (where the plug-in is located) within quotes. 
 +Use ""​ for the root Plug-in menu.
 ; pluginname: The name of the plug-in name and window title (supply it within quotes) ; pluginname: The name of the plug-in name and window title (supply it within quotes)
 ; containerindex:​ The 1-based container from the top. Top container is 1, second container is 2, etc. ; containerindex:​ The 1-based container from the top. Top container is 1, second container is 2, etc.
Line 61: Line 72:
 </​code>​ </​code>​
  
 +The //​setJWpluginpanelvalue()//​ function sets a value in the panel to the right.
 <​code>​ <​code>​
 setJWpluginpanelvalue(pluginname,​ panelitemnumber,​ value) setJWpluginpanelvalue(pluginname,​ panelitemnumber,​ value)
Line 103: Line 114:
 </​code>​ </​code>​
  
 +/* The //​applyandcloseJWpluginwindow()//​ function will simulate a press of the Enter key and close the plug-in window. */
 <​code>​ <​code>​
 applyandcloseJWpluginwindow(pluginname) applyandcloseJWpluginwindow(pluginname)
Line 121: Line 133:
 } }
 </​code>​ </​code>​
 +
  
 <​code>​ <​code>​
autohotkey.txt · Last modified: 2013/04/28 17:17 by jariw