Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Convert this software to Autohotkey


  • Please log in to reply
8 replies to this topic
Cattleya
  • Members
  • 90 posts
  • Last active: Sep 13 2013 05:11 AM
  • Joined: 28 Sep 2011
Download: http://softwarespot....ware/mousinity/

Mousinity creates an infinity effect for your cursor when it reaches the edges of your screen. For example if you go to the top of your screen, your mouse will appear on the bottom, right-to-left, etc. This is especially useful for large screens.


Anyone help me please, many thank!

dmg
  • Members
  • 2395 posts
  • Last active: Nov 04 2015 06:46 AM
  • Joined: 19 Nov 2010

I am am acquainted with the programmer. I am not sure it can be rebuilt in AHk due to how the cursor moves instantaniously from one point to another. It it were to be done it would require some fancy fiddling, probably with a dllcall or some such (beyond my ability).

 

Why do you want an AHk version? Does his AutoIT version not work for you?


"My dear Mr Gyrth, I am never more serious than when I am joking."
~Albert Campion

-----------------------------------------------------------------------------------------------
Website | Demo scripts | Blog | External contact

Cattleya
  • Members
  • 90 posts
  • Last active: Sep 13 2013 05:11 AM
  • Joined: 28 Sep 2011
Because I'm interest about this software, I also create a collection of Autohotkey script that useful for me. But for this software, I have no idea, what to do first, then second, I can't figure anything sad.png

vsub
  • Members
  • 1098 posts
  • Last active: Sep 28 2015 09:48 AM
  • Joined: 10 Nov 2011

it would require some fancy fiddling

 

Fancy?

It's just a simple loop\settimer,mousegetpos and mousemove

 

Loop
{
Sleep,50
MouseGetPos,OutputVarX, OutputVarY
ToolTip,%OutputVarX%`,%OutputVarY%
If OutputVarX > % A_ScreenWidth
{
MouseMove, 1,%OutputVarY%,0
Continue
}
If OutputVarX = 4
{
MouseMove, % A_ScreenWidth - 2,%OutputVarY%,0
Continue
}
If OutputVarY > % A_ScreenHeight
{
MouseMove, %OutputVarX%,1,0
Continue
}
If OutputVarY = 4
{
MouseMove, %OutputVarX%,% A_ScreenHeight - 1 ,0
Continue
}
}

 

Edit the values to your needs



dmg
  • Members
  • 2395 posts
  • Last active: Nov 04 2015 06:46 AM
  • Joined: 19 Nov 2010

I said what I did because Mousinity moves the cursor instantaniously from one point to another. Even at the fastest possible speed settings MouseMove still moves the cursor across the pixals seperating the two points, so MouseMove cannot do the job.


"My dear Mr Gyrth, I am never more serious than when I am joking."
~Albert Campion

-----------------------------------------------------------------------------------------------
Website | Demo scripts | Blog | External contact

dmg
  • Members
  • 2395 posts
  • Last active: Nov 04 2015 06:46 AM
  • Joined: 19 Nov 2010

I am surprised! With a bit of tinkering your script does come pretty darn close to reproducing the right and bottom portions of Mousinity:

setbatchlines, -1

Loop
 {
   ;Sleep, 50
   MouseGetPos,OutputVarX, OutputVarY
   ToolTip,%OutputVarX% `, %OutputVarY%
   If OutputVarX = % A_ScreenWidth - 1
    {
      MouseMove, 1, %OutputVarY%, 0
      Continue
    }
   If OutputVarX = 4
    {
      MouseMove, % A_ScreenWidth - 2, %OutputVarY%, 0
      Continue
    }
   If OutputVarY = % A_ScreenHeight - 1
    {
      MouseMove, %OutputVarX%, 1, 0
      Continue
    }
   If OutputVarY = 4
    {
      MouseMove, %OutputVarX%, % A_ScreenHeight - 1, 0
      Continue
    }
 }

Maybe MouseMove can do the job. My apologies. icon_redface.gif


"My dear Mr Gyrth, I am never more serious than when I am joking."
~Albert Campion

-----------------------------------------------------------------------------------------------
Website | Demo scripts | Blog | External contact

Cattleya
  • Members
  • 90 posts
  • Last active: Sep 13 2013 05:11 AM
  • Joined: 28 Sep 2011

Thank both of you two!!! Maybe this is a solution for MouseMove speed, the thread owner confirmed add

 

 

SetMouseDelay,-1 ;remove delays from mouse actions 
SetBatchLines, -1 
Process, Priority,, High

 

Make MouseMove even faster!! I will try and report later :D

 

http://www.autohotke...mouse-movement/

 

_________________

Ok, tested and this script is fine with:

SetBatchLines, -1
SetMouseDelay,-1 ;remove delays from mouse actions 

Loop
 {
;   Sleep, 50
   MouseGetPos,OutputVarX, OutputVarY
   ToolTip,%OutputVarX% `, %OutputVarY%
   If OutputVarX = % A_ScreenWidth - 1
    {
      MouseMove, 1, %OutputVarY%, 0
      Continue
    }
   If OutputVarX = 4
    {
      MouseMove, % A_ScreenWidth - 2, %OutputVarY%, 0
      Continue
    }
   If OutputVarY = % A_ScreenHeight - 1
    {
      MouseMove, %OutputVarX%, 1, 0
      Continue
    }
   If OutputVarY = 4
    {
      MouseMove, %OutputVarX%, % A_ScreenHeight - 1, 0
      Continue
    }
 }
 
!ESC::Suspend
^!ESC::Reload

But please help compelete this script to make it move right to left, left to right, top to bottom, bottom to top like Mousinity did. Thanks!



nothing
  • Members
  • 129 posts
  • Last active: Oct 03 2014 04:51 AM
  • Joined: 09 Jan 2010

Hi ,Cattleya

Welcome to AHK.

your request is very simple with ahk.

here is a solution:

 

#NoEnv
#Persistent
CoordMode,Mouse
SetBatchLines,-1
OffSet := 1
SetTimer,cophaichuotoriamanhinh,10
cophaichuotoriamanhinh:
 MouseGetPos,X,Y
 nX := (X < OffSet ? A_ScreenWidth-OffSet : X >= A_ScreenWidth-OffSet ? OffSet : 0), nY := (Y < OffSet ? A_ScreenWidth-OffSet : Y >= A_ScreenHeight-OffSet ? OffSet : 0)
 if (nX||nY)
  MouseMove,nX ? nX : X,nY ? nY : Y,0
return


nothing is impossible with ahk (_L).
Excuse my bad English.
Busy

Cattleya
  • Members
  • 90 posts
  • Last active: Sep 13 2013 05:11 AM
  • Joined: 28 Sep 2011
Thank you for help, have a nice day :)