scroll help needed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • jackdaniels
    No longer a forum member
    • Mar 2007
    • 533

    scroll help needed

    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 :
    Code:
    --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 :
    Code:
    Page.StartTimer(String.ToNumber(Input.GetText("Input1")))
    PAGE ON TIMER : (SCROLLS DOWN)
    Code:
    Page.StopTimer()
    nSpeed=String.ToNumber(Input.GetText("Input1"))
    ScrollWeb("Web1", WM_VSCROLL, SB_LINEDOWN)
    Page.StartTimer(nSpeed)
    Last edited by jackdaniels; 03-24-2008, 01:03 PM.
  • jackdaniels
    No longer a forum member
    • Mar 2007
    • 533

    #2
    i need help to make it scrool up when at the bottom and scroll down when at the top automoticly...

    Comment

    • jackdaniels
      No longer a forum member
      • Mar 2007
      • 533

      #3
      do i need timer plugin for that or can i use it without it?

      Comment

      Working...
      X