PDA

View Full Version : scroll help needed



jackdaniels
03-24-2008, 01:50 PM
i want to make it scroll up when it is at the bottom end of the page and scroll down when it is at the top end of the page

GLOBAL FUNCTIONS :

--global variables
GW_CHILD = 5;

SB_LINEUP = 0
SB_LINELEFT = 0
SB_LINEDOWN = 1
SB_LINERIGHT = 1
SB_PAGEUP = 2
SB_PAGELEFT = 2
SB_PAGEDOWN = 3
SB_PAGERIGHT = 3
SB_THUMBPOSITION = 4
SB_THUMBTRACK = 5
SB_TOP = 6
SB_LEFT = 6
SB_BOTTOM = 7
SB_RIGHT = 7
SB_ENDSCROLL = 8

WM_HSCROLL = 276
WM_VSCROLL = 277



function ScrollWeb(sWebObject, nDirection, nScroll)
--get the handle of the web object
tblWebProp = Web.GetProperties(sWebObject)

--get the child window
hwndChild = DLL.CallFunction(_SystemFolder.."\\User32.dll", "GetWindow", tblWebProp.WindowHandle..","..GW_CHILD, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
HWnd = DLL.CallFunction(_SystemFolder.."\\User32.dll", "ChildWindowFromPoint", hwndChild..",1,1", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)


--send the message to scroll
n = DLL.CallFunction(_SystemFolder.."\\User32.dll", "SendMessageA", HWnd..","..nDirection..","..nScroll..",0", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
end


PAGE ON SHOW :

Page.StartTimer(String.ToNumber(Input.GetText("Input1")))

PAGE ON TIMER : (SCROLLS DOWN)

Page.StopTimer()
nSpeed=String.ToNumber(Input.GetText("Input1"))
ScrollWeb("Web1", WM_VSCROLL, SB_LINEDOWN)
Page.StartTimer(nSpeed)

jackdaniels
03-24-2008, 04:32 PM
i need help to make it scrool up when at the bottom and scroll down when at the top automoticly...

jackdaniels
03-25-2008, 10:09 AM
do i need timer plugin for that or can i use it without it?