PDA

View Full Version : help please code doesnt work



GoOgLe
12-12-2008, 04:08 PM
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...


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)

ButtonMaker
12-14-2008, 02:17 AM
i like that m8, did you find out how to do it ?

ShadowUK
12-14-2008, 02:46 AM
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...


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.

S0mbre
12-14-2008, 02:54 AM
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...


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:


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);

GoOgLe
12-14-2008, 03:04 AM
thanks alot sombre but it doesnt scrool up when it comes to bottom !!!

S0mbre
12-15-2008, 05:27 AM
thanks alot sombre but it doesnt scrool up when it comes to bottom !!!

Can you post the APZ here?

ShadowUK
12-15-2008, 06:15 AM
Seconded..

TJ_Tigger
12-15-2008, 09:28 AM
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.

GoOgLe
12-16-2008, 02:45 AM
Can you post the APZ here?

here is the apz file

GoOgLe
12-19-2008, 06:15 AM
has anyone idea what is wrong with it ???

S0mbre
12-24-2008, 06:49 AM
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! :cool

7480

GoOgLe
12-24-2008, 06:52 AM
thanks alot alot sombre