AutoHotkey Community

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 72 posts ]  Go to page Previous  1, 2, 3, 4, 5
Author Message
 Post subject:
PostPosted: January 11th, 2011, 6:17 am 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5482
Location: the tunnel(?=light)
These types of questions belong in Ask for Help. To answer your question:

A_Cursor

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: uhhjhbbjg
PostPosted: April 27th, 2011, 6:36 pm 
:roll: :oops: :lol: :o :cry: :arrow: :idea: :?: :!: :evil: :x :? :D :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 22nd, 2011, 12:36 pm 
A note to the author.

From http://msdn.microsoft.com/en-us/library ... 33(v=vs.85).aspx
Quote:
An application must not delete a DC whose handle was obtained by calling the GetDC function. Instead, it must call the ReleaseDC function to free the DC

In your script you do exactly that.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 6th, 2011, 12:41 pm 
Offline

Joined: December 2nd, 2010, 11:14 pm
Posts: 214
Location: Poland
I have a feature request, could you add an option to display mouse position relative to a control?
something like this:
http://imageshack.us/photo/my-images/41 ... d01ay.png/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 6th, 2011, 5:51 pm 
Offline

Joined: June 17th, 2008, 7:51 am
Posts: 243
Just replace lines 316-319
Code:
      Gui, 1:Add, Text, x5 y28 Section, Pos. rel. to Window
      Gui, 1:Add, Edit, x+2 yp-3 w80 vEdtDataMousePosWin,

      Gui, 1:Add, Button, x+28 yp-1 vBtnShowList gBtnShowList -Wrap, % iif(ChkShowList,"<< Less Info","More Info >>")

with this
Code:
      Gui, 1:Add, Text, x5 y28 Section, PosRel W/C
      Gui, 1:Add, Edit, x+2 yp-3 w70 vEdtDataMousePosWin,
      ; Gui, 1:Add, Text, x145 y28 Section, Control
      Gui, 1:Add, Edit, x+2 yp w70 vEdtDataMousePosCon,

      Gui, 1:Add, Button, x+2 yp-1 vBtnShowList gBtnShowList -Wrap, % iif(ChkShowList,"<< Less Info","More Info >>")

and lines 1216-1228
Code:
GetMouseInfo:
  ;get mouse pos relative to windows
  WinGetPos, WindowActiveX, WindowActiveY,,, A
  WinGetPos, WindowX, WindowY,,, ahk_id %MouseWindowUID%
  MouseWindowActiveX := MouseScreenX - WindowActiveX
  MouseWindowActiveY := MouseScreenY - WindowActiveY
  MouseWindowX := MouseScreenX - WindowX
  MouseWindowY := MouseScreenY - WindowY


  GuiControl, 1:, EdtMousePosScreen, x%MouseScreenX% y%MouseScreenY%
  GuiControl, 1:, EdtMousePosWin, x%MouseWindowX% y%MouseWindowY%
  GuiControl, 1:, EdtEasyMousePosWin, x%MouseWindowX% y%MouseWindowY%
  GuiControl, 1:, EdtDataMousePosWin, x%MouseWindowX% y%MouseWindowY%

  GuiControl, 1:, EdtMousePosAWin, x%MouseWindowActiveX% y%MouseWindowActiveY%

with
Code:
GetMouseInfo:
  ;get mouse pos relative to windows
  WinGetPos, WindowActiveX, WindowActiveY,,, A
  WinGetPos, WindowX, WindowY,,, ahk_id %MouseWindowUID%
  MouseWindowActiveX := MouseScreenX - WindowActiveX
  MouseWindowActiveY := MouseScreenY - WindowActiveY
  MouseWindowX := MouseScreenX - WindowX
  MouseWindowY := MouseScreenY - WindowY
   MouseControlX := MouseWindowX - ControlX - 1
   MouseControlY := MouseWindowY - ControlY - 1
  GuiControl, 1:, EdtMousePosScreen, x%MouseScreenX% y%MouseScreenY%
  GuiControl, 1:, EdtMousePosWin, x%MouseWindowX% y%MouseWindowY%
  GuiControl, 1:, EdtEasyMousePosWin, x%MouseWindowX% y%MouseWindowY%
  GuiControl, 1:, EdtDataMousePosWin, x%MouseWindowX% y%MouseWindowY%
  GuiControl, 1:, EdtDataMousePosCon, x%MouseControlX% y%MouseControlY%
  GuiControl, 1:, EdtMousePosAWin, x%MouseWindowActiveX% y%MouseWindowActiveY%

_________________
Greetings
Rog


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2011, 12:59 am 
Offline

Joined: March 2nd, 2007, 7:25 am
Posts: 57
Location: Germany
It seems this script doesnt't work with AHK_L. AHK_L always crashes after some time.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2011, 1:23 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
I don't have any problems with it.

However, when I ran the script with AutoHotkey Basic or AutoHotkey_L 32-bit on my 64-bit Windows 7 system, it frequently caused explorer.exe to crash. The reason was that it tries to allocate memory in explorer.exe to retrieve information from the Desktop ListView, but the pointer to this memory gets truncated from 64-bit to 32-bit. I worked around this by compiling the script with a 64-bit AutoHotkeySC.bin. (I never saw the script crash, just explorer.exe.)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2011, 4:02 pm 
Offline

Joined: July 6th, 2009, 9:58 pm
Posts: 678
Not sure why, but the 'Mouse' tab is EXTREMELY slow to re-draw.

Windows7


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 1st, 2011, 5:13 pm 
Offline

Joined: October 21st, 2006, 5:13 pm
Posts: 23
randallf wrote:
Not sure why, but the 'Mouse' tab is EXTREMELY slow to re-draw.

Windows7

You need to disable the Aero theme by changing it to the Basic or, better still, Classic theme.

Would anyone know if it is possible to adapt this script to be compatible with the Aero theme?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 1st, 2011, 8:50 pm 
Offline
User avatar

Joined: August 23rd, 2010, 6:22 pm
Posts: 781
Location: Ontario, Canada
Here's a faster version that uses FastPixelGetColor() from around the forums:

Edit: Here's a link to the code since the script is so long.

_________________
AutoHotkey.net | GitHub

My default license.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 1st, 2011, 10:42 pm 
Offline

Joined: December 26th, 2010, 7:40 pm
Posts: 4172
Location: Awesometown, USA
randallf wrote:
Not sure why, but the 'Mouse' tab is EXTREMELY slow to re-draw.

Windows7
:idea: Gui -Theme

_________________
Autofire, AutoClick, Toggle, SpamWindow Control Tools
Recommended: AutoHotkey_L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 2nd, 2011, 12:23 pm 
Offline

Joined: October 21st, 2006, 5:13 pm
Posts: 23
Uberi wrote:
Here's a faster version


Thanks.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: nomissenrojb, Rajat and 56 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