AutoHotkey Community

It is currently May 27th, 2012, 11:18 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: November 25th, 2010, 10:29 am 
Offline

Joined: November 18th, 2006, 7:56 pm
Posts: 305
Yes I have a CursorNavigator.ini that actually contains my settings. But these aren't read/displayed/used by the script. :(

Code:
[CursorNavigator]
WaitTop=1
WaitLeft=0
WaitRight=0
WaitBottom=1
WaitTopDuration=498
WaitLeftDuration=1294
WaitRightDuration=1294
WaitBottomDuration=498

The script behaves really crazy.... works only at the top of monitors 1 and 2, but not at all on monitor 3, also not at all at the sides of the desktop (most of the time...) Then it suddenly changes and decides to work on monitor 3 and on the desktop sides, but not anymore on monitors 1 and 2. :( :(

Where is your version after all, in order to give it a try?

Cheers David.P


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 25th, 2010, 10:56 am 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
David.P wrote:
Where is your version


It is linked in the title post, works in single monitor setup :
http://autohotkey.net/goyyah/CrazyScrip ... igator.ahk


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 25th, 2010, 11:22 am 
Offline

Joined: November 18th, 2006, 7:56 pm
Posts: 305
Thanks --- this seems to work MUCH better! I hardcoded my desktop width into the script and it works with no problems with three monitors.

Also it saves AND reads its settings.

Btw, a question reagarding the script:

How does the timer CheckMousePos work? Is it correct that the timer is only called from within itself, and why is that so? Doesn't it take a lot of CPU to have the timer as low as 10 milliseconds?

Cheers David.P


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 25th, 2010, 11:53 am 
Offline

Joined: November 18th, 2006, 7:56 pm
Posts: 305
Aaaaaahhhhg it doesn't work when dragging files over screen edges :(

That's actually the only purpose I'd need the script for....


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 25th, 2010, 12:20 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
David.P wrote:
Is it correct that the timer is only called from within itself, and why is that
so?


Maybe I did not know about Critical, then.

David.P wrote:
Doesn't it take a lot of CPU to have the timer as low as 10 milliseconds?

10ms is enough help to not heat up the processor - if that is what you are worried about. Running this script for one year would put less strain than a '1 hour video conversion' - is my baseless guess.
But of course, the script could have been written better since I was just a noob when I wrote it. If I rewrite it now, I would use A_TimeIdlePhysical to dynamically accelerate/decelerate period between 10,100 & 500 ms.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 25th, 2010, 12:39 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
David.P wrote:
Aaaaaahhhhg it doesn't work when dragging files over screen edges :(
That's actually the only purpose I'd need the script for....


:D

The following part of the code is the culprit:

Code:
CheckMousePos:

  ShiftIsDown := GetKeyState("Shift" , "P")
  If ShiftIsDown
     Exit

  If A_OSType=WIN32_NT
     {
        MouseLeftButtonIsDown := GetKeyState("LButton" , "P")
        If MouseLeftButtonIsDown
           Exit
     }


Without that part of the code ( in darkred ), if you try to resize a window to the edge of your screen, it will jump to the opposite direction. So that part of code checks whether you left mouse button is down, before it can alter the mouse cursor position.

If you replace the code with following ...

Code:
  If GetKeyState("LButton" , "P" ) && ! GetKeyState("LControl" , "P" )
     Exit


.. then you can drag files when left control button is down.

Hope that helps...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 25th, 2010, 1:11 pm 
Offline

Joined: November 18th, 2006, 7:56 pm
Posts: 305
Thanks very much Skan -- I'll try that then.

Keep up the good work,

Cheers David.P


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3

All times are UTC [ DST ]


Who is online

Users browsing this forum: nomissenrojb, Rajat and 55 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group