Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rimmi2002

macrumors member
Original poster
Apr 6, 2011
93
0
Hi I have a mouse emulator for windows. I have pasted my code for it below. I was wondering if anyone help me write a script to do similar on Mac?

I have posted else as to why mouse keys and switch control do not cut it for me. Please find my posts here as well to read more. thank .

http://forums.anandtech.com/showthread.php?p=35681658&posted=1#post35681658

Code:
HotKeySet('{f2}', 'Lclick')
HotKeySet('{f3}', 'Rclick')
HotKeySet('{f4}', 'Ldown')


$Ldown = False


#RequireAdmin
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


While 1
Sleep(100)
If $ldown Then
   ToolTip("Ldown", 0, 0)
   Else
   ToolTip("", 0, 0)
EndIf
WEnd


Func Lclick()
CheckLdown()
MouseClick("left")
EndFunc

Func Rclick()
CheckLdown()
MouseClick("right")
EndFunc

Func CheckLdown() ;If Left click is down, releases it. 
   If $Ldown Then
	  LDown()
   EndIf
EndFunc


Func Ldown()
   If $ldown Then
	  $ldown = False
	  Mouseup("left")
   Else
	  $ldown = True
	  MouseDown("left")
   EndIf
EndFunc

Func Quit()
   Exit
EndFunc   ;==>Quit
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.