Sign in to follow this  
Followers 0
Maffe811

Gesture program idea!

15 posts in this topic

Its a idea for a gesture program.

You hold a key and moves your mouse in a patern, in this case a clockwise circle, and it works as a shortcut!

I know my way sucks and there is a better way to do it.

So if anyone wants to tell me this better way, please feel free to do so!

The top comments are just so i know what to put where :)

;$MousePos[0] <--->
;$MousePos[1] ^---v
;MousePos(0) < $MousePos[0] Left
;MousePos(1) < $MousePos[1] Up

Global $Step = 0

Func _CircularStep0()
$MousePos = MouseGetPos()
ToolTip($MousePos[0] & " - " & $MousePos[1],10,10)
    ;Down-Left
    If MouseGetPos(0) < $MousePos[0] and MouseGetPos(1) > $MousePos[1] then
        TrayTip("","Down-Left",1)
        $Step += 1
    EndIf
EndFunc

Func _CircularStep1()
$MousePos = MouseGetPos()
ToolTip($MousePos[0] & " - " & $MousePos[1],10,10)
    ;Left
    If MouseGetPos(0) < $MousePos[0] and MouseGetPos(1) = $MousePos[1] then
        TrayTip("","Left",1)
        $Step += 1
    EndIf
EndFunc

Func _CircularStep2()
$MousePos = MouseGetPos()
ToolTip($MousePos[0] & " - " & $MousePos[1],10,10)
    ;Up-Left
    If MouseGetPos(0) < $MousePos[0] and MouseGetPos(1) < $MousePos[1] then
        TrayTip("","Up-Left",1)
        $Step += 1

    EndIf
EndFunc

Func _CircularStep3()
$MousePos = MouseGetPos()
ToolTip($MousePos[0] & " - " & $MousePos[1],10,10)
    ;Up
    If MouseGetPos(0) = $MousePos[0] and MouseGetPos(1) < $MousePos[1] then
        TrayTip("","Up",3)
        $Step += 1
    EndIf
EndFunc

Func _CircularStep4()
$MousePos = MouseGetPos()
ToolTip($MousePos[0] & " - " & $MousePos[1],10,10)
    ;Up-Right
    If MouseGetPos(0) > $MousePos[0] and MouseGetPos(1) < $MousePos[1] then
        TrayTip("","Up-Right",1)
        $Step += 1

    EndIf
EndFunc

Func _CircularStep5()
$MousePos = MouseGetPos()
ToolTip($MousePos[0] & " - " & $MousePos[1],10,10)
    ;Right
    If MouseGetPos(0) > $MousePos[0] and MouseGetPos(1) = $MousePos[1] then
        TrayTip("","Right",3)
        $Step += 1
    EndIf
EndFunc

Func _CircularStep6()
$MousePos = MouseGetPos()
ToolTip($MousePos[0] & " - " & $MousePos[1],10,10)
    ;Down-Right
    If MouseGetPos(0) > $MousePos[0] and MouseGetPos(1) < $MousePos[1] then
        TrayTip("","Down-Right",1)
        $Step += 1

    EndIf
EndFunc

Func _CircularStep7()
$MousePos = MouseGetPos()
ToolTip($MousePos[0] & " - " & $MousePos[1],10,10)
    ;Down
    If MouseGetPos(0) > $MousePos[0] and MouseGetPos(1) > $MousePos[1] then
        TrayTip("","Down",3)
        $Step = 0
    EndIf
EndFunc

While 1
If $Step = 0 then
    _CircularStep0()
ElseIf $Step = 1 then
    _CircularStep1()
ElseIf $Step = 2 then
    _CircularStep2()
ElseIf $Step = 3 then
    _CircularStep3()
ElseIf $Step = 4 then
    _CircularStep4()
ElseIf $Step = 5 then
    _CircularStep5()
ElseIf $Step = 6 then
    _CircularStep6()
ElseIf $Step = 7 then
    _CircularStep7()
Endif
    Sleep(40)
ConsoleWrite($Step & @CRLF)
Wend

[font="helvetica, arial, sans-serif"]Hobby graphics artist, using gimp.Automating pc stuff, using AutoIt.Listening to music, using Grooveshark.[/font]Scripts:[spoiler]Simple ScreenshotSaves you alot of trouble when taking a screenshot!Don't remember what happened with this, but aperantly the exe is all i got.If you don't want to run it, simply don't._IsRun UDFIt figures out if the script has ben ran before based on the info in a ini file.If you don't want to use exactly what i wrote, you can use it as inspiration.[/spoiler]

Share this post


Link to post
Share on other sites



I don`t know what you mean. Do you want to capture the mouse movement to know what direction it takes?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

No he means gestures

I think the ipad has similar idea but using a touchscreen like the woman does in the electricity advert

I think Maffe is on about using different keys for different gestures.

Like this

This may come into use when win 8 and touchscreens hit the planet

Chim

Edited by Chimaera

Share this post


Link to post
Share on other sites

sorry but still don`t understand, what is a "gesture" applied to a mouse movement?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Well nothing without software that can understand the gesture

software like these

http://www.ilovefreesoftware.com/17/windows/desktop-enhancement/gmote-control-your-programs-through-mouse-gestures.html

Chim

Btw Maffe what do you hope to gain with gestures?

Edited by Chimaera

Share this post


Link to post
Share on other sites

I believe it's when you make a certain movement with your mouse on the screen (like a circle or triangle etc.) and each shape you draw with the mouse acts like a hotkey.


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

I believe it's when you make a certain movement with your mouse on the screen (like a circle or triangle etc.) and each shape you draw with the mouse acts like a hotkey.

Now i get it! :) i found what to do this afternoon ;)

Share this post


Link to post
Share on other sites

you may want to search the forum on this idea. I think it has been discussed before.

Why ?

I don't want a gesture program.

I want to write it! It was just a random idea i had.

Btw Maffe what do you hope to gain with gestures?

Idk. I was just trying to see if it could be done.

My plan was hold Ctrl+Shift then do a gesture.

Different gesture, different things happen.

But if its so wrong that this is just another gesture program, ill call make it discontinued.


[font="helvetica, arial, sans-serif"]Hobby graphics artist, using gimp.Automating pc stuff, using AutoIt.Listening to music, using Grooveshark.[/font]Scripts:[spoiler]Simple ScreenshotSaves you alot of trouble when taking a screenshot!Don't remember what happened with this, but aperantly the exe is all i got.If you don't want to run it, simply don't._IsRun UDFIt figures out if the script has ben ran before based on the info in a ini file.If you don't want to use exactly what i wrote, you can use it as inspiration.[/spoiler]

Share this post


Link to post
Share on other sites

But if its so wrong that this is just another gesture program, ill call make it discontinued.

There is nothing wrong with the idea, people are just pointing out that its not a new idea here. And if you wanted it just for a practical reason, there is no point to the time and effort.

It will be good coding exercise to make your own. I sometimes look at ideas in the example forums and see if I can make it myself. Its interesting when I finish to go back and compare my code to the authors of the ones I took the idea from.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Btw Maffe what do you hope to gain with gestures?

I apologize to Maffe, i probably didn't phrase that very well.

What i should have said was..

Btw Maffe what do you hope to gain with gestures tied to a hotkey as in my head it kinda defeats the object of the mouse gesture.

However it occurred to me that someone that maybe has rheumatism might not be able to gesture the mouse very well so a hotkey would do the trick.

And its not wrong to make another one Maffe keep going and make it good

Chim

Share this post


Link to post
Share on other sites

Btw Maffe what do you hope to gain with gestures tied to a hotkey as in my head it kinda defeats the object of the mouse gesture.

That's true in its own right I suppose, an example of its usefulness might be that it can dramatically extend your options for one hotekey, perhaps you have your keyboard finger hovering over one particular key, and have multiple uses for that key when used with gestures. Then there is only so many gestures you might be able to perfect with the mouse, so when used with a different key, they perform different tasks.

Thinking about it, its a really great idea.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

I usually have my fingers hovering about ctrl + z :)

I had an idea to use gestures to switch between programs.


[font="helvetica, arial, sans-serif"]Hobby graphics artist, using gimp.Automating pc stuff, using AutoIt.Listening to music, using Grooveshark.[/font]Scripts:[spoiler]Simple ScreenshotSaves you alot of trouble when taking a screenshot!Don't remember what happened with this, but aperantly the exe is all i got.If you don't want to run it, simply don't._IsRun UDFIt figures out if the script has ben ran before based on the info in a ini file.If you don't want to use exactly what i wrote, you can use it as inspiration.[/spoiler]

Share this post


Link to post
Share on other sites

That's true in its own right I suppose, an example of its usefulness might be that it can dramatically extend your options for one hotekey, perhaps you have your keyboard finger hovering over one particular key, and have multiple uses for that key when used with gestures. Then there is only so many gestures you might be able to perfect with the mouse, so when used with a different key, they perform different tasks.

Thinking about it, its a really great idea.

A win7 notebook with a mousepad, normally has gestures with "standard" functions/calls. For example, when you move fingers away, it´s normally interprted as zoom out and vice versa (multitouch). I mean "standard", as for example, IE9, word 2003, calypso email, and many other programs, receive zoom in/out with those gestures. Even programs done earlier like word 2003... (I do this on my notebook with win7). Also, the mouse icon changes to the zoom image on my notebook when I zoom (fingers appart).

So, I think there is some kind of "standard" here, like in a mouse, where left click is left click, no matter the mouse kind.

Depending on mousepad + driver sotware installed, you have other kind of gestures, like rotation, very similar to touch devices. Some are configurable, like "3 fingers down" make a click or so on.

I have no idea of what are these "standard" commands, even on plain mouse, where to get them. For that I use mouseGetCursor, mouseGetPos, _iskeyPressed and correlated au3 functions.

Same way mouseGetCursor, I think something like GestureGetOperation, where it could returnan an array whith the operation performed, like zoom, rotation, drag, touch and even mouse operations like left/firgth, mid click, up and down, etc. Also, the amount performed for each one in case of zoom, rotation, number of fingers, etc.

Finally, whe must not forget that win8 is strongly based on gestures and touch.

Jose

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0