Sign in to follow this  
Followers 0
Reflected

X Axis lock?

6 posts in this topic

Hello! im looking for x axis "lock" i found this, but was wondering if someone could make samething but for x axis (so mouse can go only up and down). Thanks forehand.

HotKeySet("{f1}", "lockmouse" )
HotKeySet("{f2}", "unlockmouse" )
HotKeySet("{f3}", "exitprog" )
Global $yaxis = "525"
Global $loop = 0
while 1
    sleep( 100 )
Wend
Func lockmouse()
    $loop = 1
    while $loop = 1
        $x = MouseGetPos ( 0 )
        MouseMove ( $x, $yaxis , 0 )
    Wend
EndFunc
Func unlockmouse()
    $loop = 0
EndFunc
Func exitprog()
    exit
EndFunc

Share this post


Link to post
Share on other sites



Hey Reflected!!

Maybe This is what u want

Thumbs Up if it helps u out ;)

#Include <Misc.au3>
OnAutoItExitRegister('release')
HotKeySet('^x','_xaxis')
HotKeySet('^y','_yaxis')
HotKeySet('^r','release')
Func _xaxis()
release()
_MouseTrap(0 ,  @DesktopHeight/2 , @DesktopWidth ,  @DesktopHeight/2)
EndFunc
Func _yaxis()
release()
_MouseTrap( @DesktopWidth/2 ,  0 ,  @DesktopWidth/2 , @DesktopHeight)
EndFunc
Func release()
_MouseTrap()
EndFunc
While 1
Sleep(10^1011010101010110^10101010101010)
WEnd

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Okay got it working! Thanks alot!

Edited by Reflected

Share this post


Link to post
Share on other sites

Ur Welcome ;)


My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites

"10^1011010101010110^10101010101010" ???? Even without the third number you are overflowing AutoIt's integers. The maximum sleep you can have will be less than 10^20 (2^64-1) and even then I'm not sure if it will work.

Sleep(10) in a while loop works just as well ;)

Share this post


Link to post
Share on other sites

Yeah Very Rite Mat

I just did it out of fun ;)


My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

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