Post Reply  Post Thread 
circle scroll
Author Message
zerozero
Junior Member
**


Posts: 3
Group: Registered
Joined: Sep 2008
Status: Offline
Reputation: 0
Post: #1
circle scroll

Hey all, I have just orderd my omnimouse and am interested in the scroll ability - I get the impression that there is currently some issues with the current scroll methods with determining the speed of the scroll.

What I like the idea of is to have a single button press/release (or toggle) a "scroll mode". Then when in scroll mode a clockwise circular motion would move forwards and anti-clockwise would move backwards (just like ipod). This way we can control the speed nicely and actually I think this would be even better than the current wheel scrolls in a lot of ways.

Is this possible with the programming language, if not what are the restrictions that prevent it? I am a .net developer by trade so will get into the programming language and write it myself if someone hasn't already done it, but if anyone can let me know pointers in the docs to check out that would be great!

09-01-2008 04:13 AM
Find all posts by this user Quote this message in a reply
Kimo
-
*******


Posts: 19
Group: Administrators
Joined: Jul 2008
Status: Offline
Reputation: 0
Post: #2
RE: circle scroll

I really like that idea of having an ipod scroll. The one thing that most people over look with the different scroll macros is that the speed can be changed and tuned for an individual person. If you like a certain macro but the speed isn't right, things can be adjusted to make it perfect.

I liked the ipod idea so much I decided to write my version of it. For most people it might be a little too fast but it can be fixed and I will explain how in this post.

To understand how to change the speed we need to understand the Scroll Function and it's parameters.

Scroll(UandD, RandL, delay)

UandD: number of scroll commands to send. Higher values scroll faster, 1 is the default.
>0 (positive) and scroll up
<0 (negative) and scroll down

RandL: number of left and right scroll commands to send. (Not used in this macro)

delay: time in milliseconds between scroll commands. Larger values result in slower scrolling

For smoother scrolling I usually leave all the default values of each parameter and change just the delay. To change the speed you need to change all the places it occurs in the code. I have highlighted them blue. Just change the number higher or lower until you get the results you like.

The Code:
//Created By Kimo

THREAD Profile

VAR W
VAR X
VAR Y
VAR Z
VAR Direction
VAR Speed
Start:

W = 0
X = 0
Y = 0
Z = 0
Direction = 0
Speed = 1

WaitForButton(Button, ButtonMask)
SetLeds(1, 0)
SetLeds(2, 0)
SetLeds(3, 0)
StopMotionReport()

CheckX:
IF Xmikeys > 0 THEN
X = 1
GOTO CheckY
ELSEIF Xmikeys < 0 THEN
X = - 1
GOTO CheckY
ELSEIF Xmikeys == 0 THEN
GOTO CheckX
FI

CheckY:
IF Ymikeys > 0 THEN
Y = 1
GOTO CheckStart
ELSEIF Ymikeys < 0 THEN
Y = -1
GOTO CheckStart
ELSEIF Ymikeys == 0 THEN
GOTO CheckY
FI

CheckStart:
IF (X == 1 AND Y == 1) THEN
Z = 1
GOTO CheckXAgain
ELSEIF (X == 1 AND Y == -1) THEN
Z = 2
GOTO CheckXAgain
ELSEIF (X == -1 AND Y == -1) THEN
Z = 3
GOTO CheckXAgain
ELSEIF (X == -1 AND Y == 1) THEN
Z = 4
GOTO CheckXAgain
FI

CheckXAgain:
IF Xmikeys > 0 THEN
X = 1
GOTO CheckYAgain
ELSEIF Xmikeys < 0 THEN
X = - 1
GOTO CheckYAgain
ELSEIF Xmikeys == 0 THEN
Speed = 1
GOTO CheckXAgain
FI

CheckYAgain:
IF Ymikeys > 0 THEN
Y = 1
GOTO CheckChange
ELSEIF Ymikeys < 0 THEN
Y = -1
GOTO CheckChange
ELSEIF Ymikeys == 0 THEN
Speed = 1
GOTO CheckYAgain
FI

CheckChange:
IF (X == 1 AND Y == 1) THEN
W = 1
GOTO CheckMotion
ELSEIF (X == 1 AND Y == -1) THEN
W = 2
GOTO CheckMotion
ELSEIF (X == -1 AND Y == -1) THEN
W = 3
GOTO CheckMotion
ELSEIF (X == -1 AND Y == 1) THEN
W = 4
GOTO CheckMotion
FI

CheckMotion:
IF Z == 1 THEN
IF W == 1 THEN
IF Direction != 0 THEN
Scroll((Direction),0,(100/Speed))
GOTO CheckXAgain
ELSEIF Direction == 0 THEN
GOTO CheckXAgain
FI
ELSEIF W == 2 THEN
Direction = -1
GOTO Scrolling
ELSEIF W == 3 THEN
IF Direction != 0 THEN
Scroll((Direction),0,(100/Speed))
GOTO CheckXAgain
ELSEIF Direction == 0 THEN
GOTO CheckXAgain
FI
ELSEIF W == 4 THEN
Direction = 1
GOTO Scrolling
FI
ELSEIF Z == 2 THEN
IF W == 1 THEN
Direction = 1
GOTO Scrolling
ELSEIF W == 2 THEN
IF Direction != 0 THEN
Scroll((Direction),0,(100/Speed))
GOTO CheckXAgain
ELSEIF Direction == 0 THEN
GOTO CheckXAgain
FI
ELSEIF W == 3 THEN
Direction = -1
GOTO Scrolling
ELSEIF W == 4 THEN
IF Direction != 0 THEN
Scroll((Direction),0,(100/Speed))
GOTO CheckXAgain
ELSEIF Direction == 0 THEN
GOTO CheckXAgain
FI
FI

ELSEIF Z == 3 THEN
IF W == 1 THEN
IF Direction != 0 THEN
Scroll((Direction),0,(100/Speed))
GOTO CheckXAgain
ELSEIF Direction == 0 THEN
GOTO CheckXAgain
FI
ELSEIF W == 2 THEN
Direction = 1
GOTO Scrolling
ELSEIF W == 3 THEN
IF Direction != 0 THEN
Scroll((Direction),0,(100/Speed))
GOTO CheckXAgain
ELSEIF Direction == 0 THEN
GOTO CheckXAgain
FI
ELSEIF W == 4 THEN
Direction = -1
GOTO Scrolling
FI
ELSEIF Z == 4 THEN
IF W == 1 THEN
Direction = -1
GOTO Scrolling
ELSEIF W == 2 THEN
IF Direction != 0 THEN
Scroll((Direction),0,(100/Speed))
GOTO CheckXAgain
ELSEIF Direction == 0 THEN
GOTO CheckXAgain
FI
ELSEIF W == 3 THEN
Direction = 1
GOTO Scrolling
ELSEIF W == 4 THEN
IF Direction != 0 THEN
Scroll((Direction),0,(100/Speed))
GOTO CheckXAgain
ELSEIF Direction == 0 THEN
GOTO CheckXAgain
FI
FI
FI
Scrolling:

Scroll((Direction),0,(100/Speed))

IF Speed < 4 THEN
Speed = Speed + 1
GOTO Check
ELSEIF Speed == 4 THEN
GOTO Check
FI
Check:
IF ((GetButtonState & ButtonMask) != Button)
GOTO Exit
ELSEIF ((GetButtonState & ButtonMask) == Button)
W = 0
X = 0
Y = 0
Z = Z + Direction
IF Z <= 0 THEN
Z = 4
ELSEIF Z > 4 THEN
Z = 1
FI
GOTO CheckXAgain
FI

Exit:
RestartMotionReport()
SetLeds(1, 1)
SetLeds(2, 1)
SetLeds(3, 1)
GOTO Start
END



Attached File(s)
.zip File  1___A_OKMO1Ipod Scroll.zip (Size: 833 bytes / Downloads: 63)

Life's too short to be pissed off all the time
09-01-2008 09:24 PM
Find all posts by this user Quote this message in a reply
zerozero
Junior Member
**


Posts: 3
Group: Registered
Joined: Sep 2008
Status: Offline
Reputation: 0
Post: #3
RE: circle scroll

Cool thanks Kimo, can't wait for delivery of the omnimouse so I can try it out.

One aspect of the circle scroll that I was hoping for (which, if possible, would remove the need to modify the delay argument) was that each "circle click" round would go 1 scroll "notch", so therefore the faster you go round, the faster you can go, essentially mimicing the ipod functionality and provides both a very accurate method of scrolling but then also a way to scroll very quick. So I guess in this way it would be delay 0 and then the trick is to just have some uniform unit that measures a single "circle click" which I'm not sure your code does, although I'm no means an expert on this syntax yet and I have had no sleep ! Smile

In this way the variable (or constant) that could be tweaked for user preference would be how much distance the mouse should travel before a "circle click" is triggered but otherwise you would get the benefit of fast and accurate scrolling without being stuck to one single speed.

But really I need to try out your method in practice to see if there is really the problem that I think there is.

Thanks again!

Kimo Wrote:
I really like that idea of having an ipod scroll. The one thing that most people over look with the different scroll macros is that the speed can be changed and tuned for an individual person. If you like a certain macro but the speed isn't right, things can be adjusted to make it perfect.

I liked the ipod idea so much I decided to write my version of it. For most people it might be a little too fast but it can be fixed and I will explain how in this post.
....

09-03-2008 06:28 AM
Find all posts by this user Quote this message in a reply
Stussy D
Administrizzlator
*******


Posts: 29
Group: Administrators
Joined: Jul 2008
Status: Offline
Reputation: 0
Post: #4
RE: circle scroll

Wow Kimo nice macro.
We'll have to get that on the Content Menu once it gets tested a little in battle.
zero, welcome to the forums! If you are anxious to get a look at the syntax you can download the IDIScript Reference Guide over on the Content Menu. Feel free to give some feedback too as to how it is helpful or could use improvement. I am always looking to improve help documentation

http://www.idimama.com/file.php?id=118

09-04-2008 02:34 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

[-]
Quick Reply
Message
Type your reply to this message here.



Image Verification
Image Verification Please enter the text within the image on the left in to the text box below. This process is used to prevent automated posts.

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites
Rate This Thread:

Forum Jump: