11-02-2019, 09:35 PM
Hello again,
I am attempting to receive the scrollbar range of a form, say in notepad.
This is what I came up with:
Macro Macro6
I get the following error:
Any advice will be much appreciated,
Cuitino
I am attempting to receive the scrollbar range of a form, say in notepad.
This is what I came up with:
Macro Macro6
int w=win(" - Notepad" "Notepad")
Acc a.Find(w "SCROLLBAR" "Vertical" "class=Edit[]id=15" 0x1035)
int hwndScrollbar=child(a) ;;Toolbar handle
def SB_CTL 2
def SIF_RANGE 0x1
def SIF_PAGE 0x2
dll user32 #GetScrollInfo hWnd nBar SCROLLINFO'lpsi
SCROLLINFO tSI
tSI.cbSize=sizeof(SCROLLINFO)
tSI.fMask= SIF_RANGE | SIF_PAGE
GetScrollInfo(hwndScrollbar SB_CTL tSI)
out tSI.nMax
I get the following error:
Quote:Error (RT) in Macro6: Exception 0xC0000005. Access violation. Cannot read memory at 0x1C. In USER32.dll at 0x7530A8EE (0x752D0000+0x3A8EE).
Any advice will be much appreciated,
Cuitino