|
AmiBroker可以透過左右鍵移動selection bar的方式一次移動一根bar
也可以透過滑鼠操作scrollbar的方式一次移動一根bar
但我一直沒找到如何用快速鍵方式讓AmiBroker一次移動一根bar
下面是透過AutoIt HotKeySet的方式自己定義快速鍵一次移動一根bar
- Func AB_Scroll($left = False) ; default scroll right
- $hwnd = WinActive("[CLASS:AmiBrokerMainFrameClass]") ; if AcmiBroker active
- If $hwnd = 0 Then Return ; return if not AmiBroker
- $hwnd = ControlGetHandle($hwnd, "", "[CLASS:MDIClient]") ; MDIClient child
- $hwnd = _WinAPI_GetWindow($hwnd, $GW_CHILD) ; 1st child
- $hwnd = _WinAPI_GetWindow($hwnd, $GW_CHILD) ; 1st child
- $hwnd_sb = ControlGetHandle($hwnd, "", "[CLASS:ScrollBar]") ; 1st ScrollBar child
- If $left Then
- _SendMessage($hwnd, $WM_HSCROLL, $SB_LINELEFT, $hwnd_sb)
- Else
- _SendMessage($hwnd, $WM_HSCROLL, $SB_LINERIGHT, $hwnd_sb)
- EndIf
- EndFunc
複製代碼
|
評分
-
查看全部評分
|