Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2007
    Posts
    452

    Grin help please code doesnt work

    what i am trying to do is;
    if the scrollbar is at the bottom scroll it up and if it is up scrool it down !! what i am doing wrong ??? it comes down but not up...

    Code:
    Page.StopTimer()
    nSpeed=String.ToNumber(Input.GetText("Input1"))
    if ScrollWeb ~= SB_BOTTOM then
    ScrollWeb("Web1", WM_VSCROLL, SB_LINEDOWN) else
    ScrollWeb("Web1", WM_VSCROLL, SB_LINEUP)
    end
    Page.StartTimer(nSpeed)

  2. #2
    Join Date
    Mar 2007
    Posts
    172
    i like that m8, did you find out how to do it ?

  3. #3
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Quote Originally Posted by GoOgLe View Post
    what i am trying to do is;
    if the scrollbar is at the bottom scroll it up and if it is up scrool it down !! what i am doing wrong ??? it comes down but not up...

    Code:
    Page.StopTimer()
    nSpeed=String.ToNumber(Input.GetText("Input1"))
    if ScrollWeb ~= SB_BOTTOM then
    ScrollWeb("Web1", WM_VSCROLL, SB_LINEDOWN) else
    ScrollWeb("Web1", WM_VSCROLL, SB_LINEUP)
    end
    Page.StartTimer(nSpeed)
    From what I see..

    ScrollWeb = function.

    then you did if (ScrollWeb ~= SB_BOTTOM) then

    You're comparing a function with a constant.

  4. #4
    Join Date
    Jan 2008
    Location
    Ufa, Russia
    Posts
    128
    Quote Originally Posted by GoOgLe View Post
    what i am trying to do is;
    if the scrollbar is at the bottom scroll it up and if it is up scrool it down !! what i am doing wrong ??? it comes down but not up...

    Code:
    Page.StopTimer()
    nSpeed=String.ToNumber(Input.GetText("Input1"))
    if ScrollWeb ~= SB_BOTTOM then
    ScrollWeb("Web1", WM_VSCROLL, SB_LINEDOWN) else
    ScrollWeb("Web1", WM_VSCROLL, SB_LINEUP)
    end
    Page.StartTimer(nSpeed)
    If ScrollWeb returns a number (numeric variable), such as the position of the scrollbar (returning SB_BOTTOM or something else), the code should reflect that:

    Code:
    Page.StopTimer();
    nSpeed=String.ToNumber(Input.GetText("Input1"));
    local n = ScrollWeb("Web1", WM_VSCROLL, SB_LINEDOWN);
    if n ~= SB_BOTTOM then
       n = ScrollWeb("Web1", WM_VSCROLL, SB_LINEDOWN);
    else
       n = ScrollWeb("Web1", WM_VSCROLL, SB_LINEUP);
    end
    Page.StartTimer(nSpeed);

  5. #5
    Join Date
    Mar 2007
    Posts
    452
    thanks alot sombre but it doesnt scrool up when it comes to bottom !!!

  6. #6
    Join Date
    Jan 2008
    Location
    Ufa, Russia
    Posts
    128
    Quote Originally Posted by GoOgLe View Post
    thanks alot sombre but it doesnt scrool up when it comes to bottom !!!
    Can you post the APZ here?

  7. #7
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Seconded..

  8. #8
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    I have found that when you scroll to the bottom of the object the value that is returned is not the bottom number of lines but a little less than that value. I would recommend that you put a dialog or set some text on the page to identify what the bottom value will be for that object when the scroller is at the bottom and use that value.
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  9. #9
    Join Date
    Mar 2007
    Posts
    452
    Quote Originally Posted by S0mbre View Post
    Can you post the APZ here?
    here is the apz file
    Attached Files

  10. #10
    Join Date
    Mar 2007
    Posts
    452
    has anyone idea what is wrong with it ???

  11. #11
    Join Date
    Jan 2008
    Location
    Ufa, Russia
    Posts
    128
    Hey!

    If I got your message right (that you wanted to make the web scroll back as soon as it reaches the bottom), then this project should work. I didn't mess with WinAPI much, I just counted how many scrolls it takes to scroll the object one way full (down or up) and used that to put a simple check in the OnTimer event.

    Enjoy!

    autoscroll_S0mbre.apz

  12. #12
    Join Date
    Mar 2007
    Posts
    452
    thanks alot alot sombre

Similar Threads

  1. make this code work in AMS
    By synistics in forum AutoPlay Media Studio 6.0
    Replies: 0
    Last Post: 10-01-2007, 01:06 PM
  2. ANSI To UNICODE Is Finished!
    By coderanger in forum AutoPlay Media Studio 6.0
    Replies: 7
    Last Post: 08-13-2007, 09:27 AM
  3. Using a slider to show audio posiion in time
    By Randy3265 in forum AutoPlay Media Studio 5.0
    Replies: 16
    Last Post: 01-07-2006, 08:34 AM
  4. can't get version 6 code to work in 7
    By jenny62 in forum Setup Factory 7.0
    Replies: 1
    Last Post: 09-30-2005, 09:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts