Jump to content

We have moved to Discord. Please click here to join us in the Trading Terminal Discord server.



These forums are read-only.

Alastair

Scrolling in DAS Montage...Hotkey Solution with AHK

Recommended Posts

Alastair

Have wanted the feature to enable scrolling  the Montage with mouse wheel in DAS for over 24 mths. Many persons have requested it over the years from DAS.  Well I decided to stay at a Holiday Inn Express for the past week (Yes my head is hard, took a week) and have written the code below, 😎  use at your own risk.

The is another function from the group, Tech Tools for Traders (TTT) of BBT which I have developed out of frustration. Pls enjoy.  Test, test and re-test before implementation.  Any suggestions for additional tools or fixes pls drop me a note. No promises.

You will need to install AutoHotKeys. 

@KyleK29 , @Justin, @peterB @Andrew Aziz, @Bryan W, @RobertoPls spread the word, thks.

/*
  AutoHotKey script to Click top arrow and/or bottom arrow of a specific scroll bar in DAS Trader Pro Montage
*/
#SingleInstance Force
#InstallMouseHook
#NoTrayIcon
#MaxHotkeysPerInterval 200
SetTitleMatchMode,2


#IfWinActive, ahk_exe DasTrader.exe

~WheelDown::                                                            ; User clicks in window then scrolls with mouse wheel.
ControlGetFocus, OutputVar, A                            ; Get Control of current selected Window

 If (OutputVar =  "Edit2")
{
    ControlFocus, ScrollBar1, A                                ; Focus on the scroll bar of selected window
        
    ControlGetPos, x, y, w, h, ScrollBar1, A            ; Get size and coordinates on the scroll bar
        
    xVar := x + 5                                                           ; Calculate absolute location of bottom arrow button of scroll bar - set X ...center of the button
    yVar := y + h - 5                                                    ; Calculate absolute location of bottom arrow button of scroll bar - set Y
    
    xVarRel := 5                                                         ; Calculate relative location of bottom arrow button of scroll bar - set X ...center of the button
    yVarRel := h - 2                                                   ; Calculate relative location of bottom arrow button of scroll bar - set Y
    
    SetControlDelay -1
    
    ControlClick, ScrollBar1, A, , Left, 1, NA X%xVarRel%  Y%yVarRel%
    ToolTip, Scrolling Down...                             ; Display at mouse arrow
    ControlClick, Edit2, A                                    ; Select the Control/window before exiting
    SetTimer, ToolTipLabel, 1500
}
return    

~WheelUp::                                                          ; User clicks in window then scrolls with mouse wheel.
ControlGetFocus, OutputVar, A
 If (OutputVar =  "Edit2")
{
    ControlFocus, ScrollBar1, A                        ; Focus on the scroll bar of selected window
        
    ControlGetPos, x, y, w, h, ScrollBar1, A          ; Get size and coordinates on the scroll bar
        
    xVar := x + 5                                                    ; Calculate absolute location of top arrow button of scroll bar - set X ...center of the button
    yVar := y + 5                                                    ; Calculate absolute location of top arrow button of scroll bar - set Y
    
    xVarRel := 5                                                   ; Calculate relative location of bottom arrow button of scroll bar - set X ...center of the button
    yVarRel := 5                                                  ; Calculate relative location of bottom arrow button of scroll bar - set Y
    
    SetControlDelay -1
    
    ControlClick, ScrollBar1, A, , Left, 1, NA X%xVarRel%  Y%yVarRel%
    ToolTip, Scrolling Up...                             ; Display at mouse arrow
    ControlClick, Edit2, A                              ; Select the Control/window before exiting
    SetTimer, ToolTipLabel, 1500
}
return    


ToolTipLabel:
ToolTip,
SetTimer, ToolTipLabel, off
return

#IfWinActive
return                                                 ; End
 

 

ScrollMontage.txt

Edited by Alastair
Added TXT file
  • Like 1

Share this post


Link to post
Share on other sites
Alastair
On 7/2/2021 at 11:53 AM, peterB said:

please use this to highlight the actual code so it is possible to copy without formatting

image.png.1cb562320c6c823da2c70d9ba3f6ffd9.png

Hey @peterBI added a TXT file with code to first post.  I assume it will show up soon as it may be going through admin checks.  I will monitor the thread to ensure it shows within 24 hrs.  I used scite4autohotkey to compile it.

Now remember that the scroll will only work between 4:00AM EST and 8:00PM EST, which are the active trading hours.   DAS deactivates the Montage outside of these hours and the "EDIT2" test in the code will fail.  The EDIT2 test is to ensure the trader has selected the Montage window.

Any issues drop me a note in the thread.

 

Share this post


Link to post
Share on other sites
Justin

This is absolutely savage by DAS to wait until now to fix this... But the latest release has scrolling in the L2

Share this post


Link to post
Share on other sites
Alastair
2 minutes ago, Justin said:

This is absolutely savage by DAS to wait until now to fix this... But the latest release has scrolling in the L2

LOOOOOOL....I would like to believe they realized how simple it was to implement after I posted the code......HA HA....ROFL

Possible used my code....who knows.  They seem to use AHK to fix a few things too.

Share this post


Link to post
Share on other sites
Alastair

Kudos to DAS for the scrolling .......BIG THKS......been using it for a week and it works great.

 

More more pls.

Share this post


Link to post
Share on other sites

[[Template core/front/global/mobileNavigation is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.