One thing about Metastock that drives me crazy is lack of keyboard shortcuts. And if there are any; I am not aware of any of them. So, finally, I decided to geek myself out of this headache.
1. Downloaded and installed a software called AutoHotKey (http://www.autohotkey.com/download/)
2. Noted down the screen co-ordinates of the "clicks" I wanted to convert into keyboard shortcuts
3. Updated the default script file with a very simple one line commands for executing the clicks
4. Now, the keyboard shortcuts work well, I dont have to click
The syntax of the script:
#IfWinActive ahk_class MetaStockMainWnd
#z::Click 892,651
#IfWinActive
#z::Click 892,651
#IfWinActive
Where MetaStockMainWnd defines the active window where the 'clicks' should be made. If this window is not active, these keyboard commands will not work. so, these commands will work only if the Metastock window is active. "#z" stands for Windows + Z. The coordinates are for the zoom-reset button.
My starting script is as follows:
#IfWinActive ahk_class MetaStockMainWnd
#z::Click 892,651
#x::Click 910,651
#C::Click 927,651
#V::Click 950,651
#N::Click 966,651
#P::Click 15,99
#L::Click 15,150
#k::Click 14,121
#o::Click 14,171
#d::Click 264,61
#IfWinActive
#z::Click 892,651
#x::Click 910,651
#C::Click 927,651
#V::Click 950,651
#N::Click 966,651
#P::Click 15,99
#L::Click 15,150
#k::Click 14,121
#o::Click 14,171
#d::Click 264,61
#IfWinActive
Keyboard shortcuts and mnemonics:
[In Metastock buttons in order from left to right]
Zoom reset - Windows + Z (for Undo Zoom)
Zoom Out - Windows + X
Zoom In - Windows + C (for Closer look)
Previous - Windows + V (for pre_V_ious)
Next - Windows + N (for Next)
Scrip selector - Windows + S (for Scrips)
Other clicks:
Pointer - Windows + P (for Pointer)
Line - Windows + L (Line!)
Crosshair - Windows + K (for Krosshairs)
Horizontal - Windows + O (for O_rizontal line)
Data window - Windows + D (for Data)
Limitations of this script:
AutoHotKey's Click function works based on screen cooridinates. I have configured it to my screen resolution (1024x768). If your co-ordinates are different the results will be different.
The keys can be configured using the script file. It's a 1-second job.
A serious limitation:
One serious limitation of this is, which I have not tested though, if another window pops up while the computer executing the order, the 'click' will be made in that window. To me it simply means, this should not be used simlutaneously with the live trading/banking screen.
Comments
Post a Comment