Quantcast
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Autohotkey Shortcuts for OptionVue

Discussion in 'OptionVue Forum' started by Jay Hattler, Sep 14, 2015.

  1. Jay Hattler

    Jay Hattler Well-Known Member

    I have written some shortcut keys for the items I use most in OptionVue, using the Autohotkey software (free and open source). I wonder if someone has other or better suggestions for avoiding excessive mouse use in using OptionVue. The keys used can be changed by editing the values in front of the double colon.

    ; OPEN ANALYSIS WINDOW FROM THE MATRIX USING THE TILDE KEY
    `::
    {
    ControlClick, TBitBtn17, OPTIONVUE
    Send {Enter}
    }
    return

    ; OPEN TRANSACTION LOG USING THE CONTROL KEY AND THE NUMBER 1
    ^1::
    {
    ControlClick, TBitBtn7, OPTIONVUE
    Send {Enter}
    }
    return

    ; CONVERT TRADES FROM THE MATRIX USING CONTROL KEY AND THE NUMBER 2
    ^2::
    {
    ControlClick, TBitBtn22, OPTIONVUE
    Send {Enter}
    }
    return

    ; CLEAR MODEL TRADES FROM THE MATRIX USING THE CONTROL KEY AND LOWER-CASE q
    ^q::
    {
    ControlClick, TBitBtn33, OPTIONVUE
    Send {Enter}
    Sleep 250
    Send {Down 2}
    Sleep 100
    Send {Enter}
    }
    return
     
    Joe H, RayM, uwe and 1 other person like this.
  2. GreenZone

    GreenZone Well-Known Member

    Thanks for reminding me about using AutoHotkey, and applying it to OptionVue.
    For some reason, I can't get any AutoHotkey commands to be able to target the OptionVue window.

    I've created simple custom scripts for other windows (eg Skype or notepad) and it's working perfectly; but when I then try to target these same commands against the OptionVue window, it doesn't work.

    I've tried everything from:
    • using the WindowTile variations of "OPTIONVUE", "OPTIONVUE 7", "OPTIONVUE 7 [test]"
    • leaving the WindowTitle field blank
    • using the WindowTitle of "A", which stands for the active window
    • using "ahk_exe opvue.exe", as shown in Window Spy
    .....but nothing is working.

    Any ideas?
     
  3. Jay Hattler

    Jay Hattler Well-Known Member

    Ron,

    I learned a lot from your weighted vega presentation. Great stuff. Thank you so much for doing that.

    Below is another script that I use to close both the Analysis window and the T. Log window. I add it here because it uses a couple of things that I used to solve the problem you mention. One of them is the SetTitleMatchMode. The other is using the InStr (in string) function to figure out which window is active and then using the A variable after that to do what I want in each window. These are necessary because the button is "OK" in one window and "Close" in the other.

    Perhaps they will help you. If you want to send me any of your scripts via PM, I would be happy to try to run them on my machine.

    ; USE CONTROL KEY PLUS TILDE TO CLOSE WINDOWS
    ^`::
    {
    SetTitleMatchMode, 2
    WinGetTitle Title, A
    pos := 0
    pos := InStr(Title,"OPTIONVUE")
    if pos > 0
    {
    ControlClick, Close, A
    Send {Enter}
    }
    pos := 0
    pos := InStr(Title,"Transaction")
    if pos > 0
    {
    ControlClick, OK, Transaction
    Send {Enter}
    }
    return
    }
     
    RayM likes this.
  4. Jay Winger

    Jay Winger Active Member

    Hi Jay,
    I just saw your post for the first time yesterday, 3/9/16. Have you found continuing utility in using AHK and OV together? I'm having the same difficulties Ron mentioned, ie I can't send commands to the OV interface while having no issues with any other app I try. Would you be able to email me at: jcwing01@hotmail.com ? Thanks much.
     
  5. Jay Hattler

    Jay Hattler Well-Known Member

    Jay Winger,
    Since these earlier posts last September, I have upgraded to Windows 10. The upgrade has completely broken my AHK scripts for OptionVue and for TOS. There is a bit of a raging discussion over at the AHK forums about Windows 10 involving running AHK with admin rights to restore functionality. I have done this, but it still has not solved my problems with OV and TOS. I am at a loss as to why AHK is no longer recognizing key strokes from within those two applications. So I am sorry, but I am now in the same spot as others.
    Jay Hattler
     
  6. Jay Winger

    Jay Winger Active Member

    Hi Jay,
    Thanks for your reply. Actually, running AHK as administrator got it working for me, in both Windows 7 and Windows 10. If I can help in diagnosis of why it's not working for you, let me know. Jay Winger
     
  7. Jay Winger

    Jay Winger Active Member

    I've made a video demonstrating how I'm now using AutoHotKey to manipulate the OptionVue environment and extend its functionality in new ways. A big shout out to Jay Hattler for reminding me how powerful keyboard macros can be... thanks!

     
    Bruno, Roger, Chuck and 2 others like this.
  8. tecman240

    tecman240 Member

    Jay, that's great! I'm also working on some ahk scripts to bring OV to a more usable level.
    Do you know if I can enter a butterfly in the OV matrix with ahk at the short stike cell?
    I've looked with ahk spy, but I don't see a unique name or index for each matrix cell.

    thanks!
     
  9. Jay Winger

    Jay Winger Active Member

    There is no unique control identifier for each cell name within the matrix. You can however have an AHK macro send keystrokes to the matrix, including arrow keys, tabs, etc. allowing for scripted movement from a starting position into the matrix. For example if you always trade 50pt wide 10 contract put butterflies you could have AHK enter the position for you by starting your cursor at the short strike cell and pressing a hotkey for a simple macro like this (assuming your matrix is showing 10pt strikes to start with):
    x::
    {
    send -20
    send {Up 5}
    send 10
    send {Down 10}
    send 10
    ControlClick, Convert, OPTIONVUE ; optionally, you could have the script convert the trade for you also
    }
    return
     
    GreenZone likes this.
  10. Stephen

    Stephen Member

    Jay W.-

    How about we make this easy and offer your "product" for a nominal fee? I see no reason for some of us to re-create the wheel :)

    Appreciate the consideration.
    Stephen
     
    Chuck likes this.
  11. Boomer34

    Boomer34 Well-Known Member

    Great idea...being new to the PC world (Mac addict)...and being new to OV...I would gladly pay a fee to have this unpacked in a kindergarteners language for me!
     
  12. Jay Winger

    Jay Winger Active Member

    if anyone is interested in avoiding the work and purchasing my script, you can contact me at jcwing01@gmail.com
     
    Boomer34 likes this.

Share This Page