SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    May 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    finding the scroolbar section in an html page

    HI,

    I want to find which child window of an HTML page containts a scrollbar. For the moment I can switch for another childwindo using Ctr+F6 but my real problem is to find when the active ChildWindow containt a scrollbar. I've tried using scrollbarfind, but i couldn't get it work.

    thx

    ------------------

  2. #2
    Junior Member
    Join Date
    Jun 2002
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: finding the scroolbar section in an html page

    I ran into the same problem. What I figured out was that I could do some commands with with WinGetPosition( x , y, h , w <attach name> ) then I did a mouse move with some simple arithmetic on the x and y variables to move the mouse to the window I want. From there use the MouseWindow( ) to get the name of the window that contains the scrollbar. After getting the scrollbar I just looped the movement of the scrollbar to my needs. Here is an excerpt of my code

    /*Gets the X, Y, Width and Heighth of a window and stores them in the 4 variables contained in the ( )*/
    WinGetPos( XPos , YPos , WPos , HPos )
    /*Takes two of the 4 variables to create the coordinates to move the mouse*/
    WPosDiv = WPos-3
    HPosRet = HPos/2
    /*Moves the mouse to the position on the screen to get the name of the portal frame*/
    MouseMove WPosDiv , HPosRet
    Pause 3, 'seconds'
    /*Returns the name of the window underneath the cursor*/
    ResultWin = MouseWindow( )
    Print ResultWin
    //*Gets the X, Y, Width and Heighth of the window ResultWin and stores them in the 4 variables contained in the ( )*/
    WinGetPos( RXPos , RYPos , RWPos , RHPos , ResultWin )
    /*Variable holds the modification of RWPos muliplied by 6 ; This is needed for Netscape in IE the times 6 isn't necessary*/
    RWPosA = RWPos * 6
    /*Beginning of loop to move the scrollbar a certain number of lines at a time*/
    i = 1
    /*Tells the loop to run until i is greater then or equal to the variable RWPosA*/
    While i <= RWPosA
    /*Attaches to the window and gets the positions*/
    Attach( ResultWin )
    WinGetPos( RXPos , RYPos , RWPos , RHPos , ResultWin )
    /*Creates a capture box the size of the window and stores the text as strings*/
    String1 = CaptureBox( BrowseActiveName , RXPos , RYPos , RWPos , RHPos )
    Print String1
    /*Moves the scrollbar the number of lines i is equal to*/
    ret2 = ScrollBarWindow( i , 'Set Vert')
    /*Captures the text and stores it in a second string*/
    String2 = CaptureBox( BrowseActiveName , RXPos , RYPos , RWPos , RHPos)
    Print String2
    /*Tells i what number to be for the next run of the loop*/
    i = i+200
    /*Intentions are to compare the two strings and delete the duplicates from them for storage into text files*/
    ;ret = DeleteStr( String2 , String1 )
    Print ret
    /*Completes the loop to send back to the top*/
    Wend

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:50 PM.

Copyright BetaSoft Inc.