AutoHotkey Community

It is currently May 27th, 2012, 1:27 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: November 20th, 2009, 11:09 am 
Offline

Joined: November 18th, 2006, 7:56 pm
Posts: 305
Hi forum,

is it possible to briefly show a red (circular) dot at the cursor position (in order to signal a certain state change of a script)?

Kind of like this: Image

Thanks
David.P


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 11:28 am 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
Yes, there are various scripts on the forum and I think skrommel has one too (see his page at donationcoder, google it)

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 12:14 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Check out here

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 12:24 pm 
Offline

Joined: November 18th, 2006, 7:56 pm
Posts: 305
Uaahh thanks that's amazing....!

Me hovewer was more like looking for a "two lines of code" solution for a simple circle... :oops: :oops:

Is that possible -- maybe with a simple GUI command and then WinSet Region, or something...........?

Thanks David.P


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 12:26 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
A circle will not be possible I think, since there is no circle control, a square should be no problem, using WinSet,TransColor...

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 12:55 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
http://www.donationcoder.com/Software/S ... #MouseMark exe and source and I'm sure there are other solutions posted on the forum

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


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

Joined: November 18th, 2006, 7:56 pm
Posts: 305
Thanks -- that's hovewer another 250 lines and I don't even find the relevant ones that actually draw the thing :oops:

Unfortunately I can't find any other examples on the forum either...

Well I think I'll have to come up with some code myself :shock:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 1:15 pm 
Offline

Joined: November 14th, 2007, 2:47 pm
Posts: 335
Location: London, England
God forbid!

And good luck with doing this in 2 lines.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 1:24 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
David.P wrote:
Thanks -- that's hovewer another 250 lines and I don't even find the relevant ones that actually draw the thing
200 of those lines are INI, an about box, and configuration menu. So 50 is all you need and you probably won't find much room to cut down the number of lines.

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 1:36 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Try this, it will be shown when you hold CTRL:
Code:
Gui,+LastFound
Gui,Color,FF0000
hwnd:=WinExist()
Gui,Show,NA w100 h100
WinSet,Region,30-30 W40 H40 E,ahk_id %hwnd%
WinSet,Transparent,150,ahk_id %hwnd%
Gui,Hide
Return

~Ctrl::
MouseGetPos,x,y
Gui,Show,%  "x " x-50 "y" y-50
KeyWait, CTRL
Gui,Hide
Return

Esc::
GuiClose:
ExitApp

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 4:30 pm 
Offline

Joined: November 14th, 2007, 2:47 pm
Posts: 335
Location: London, England
Mine doesnt move with the mouse.

Is it meant to?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 4:33 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8666
Location: Salem, MA
you hadn't asked for that. It is only going to show where the mouse was when Ctrl was pressed.
Code:
Gui,+LastFound
Gui,Color,FF0000
hwnd:=WinExist()
Gui,Show,NA w100 h100
WinSet,Region,30-30 W40 H40 E,ahk_id %hwnd%
WinSet,Transparent,150,ahk_id %hwnd%
Gui,Hide
Return

~Ctrl::
MouseGetPos,x,y
SetTimer, showit, 50
KeyWait, CTRL
SetTimer, showit, Off
Gui,Hide
Return

showit:
Gui,Show,%  "x " x-50 "y" y-50
Return

Esc::
GuiClose:
ExitApp

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 4:42 pm 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
I tweaked it a bit.
Code:
CoordMode, Mouse

Gui, +LastFound +AlwaysOnTop +Toolwindow -Caption
Gui, Color, Red
Gui, Show, Hide w100 h100
WinSet, Region, 30-30 W40 H40 E
WinSet, Transparent, 150
return

~Ctrl::
MouseGetPos,x,y
Gui,Show,% "NA x " x-50 "y" y-50
KeyWait, Ctrl
Gui,Hide
Return

Esc::
GuiClose:
ExitApp


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 5:29 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
I did too :)
Code:
CoordMode, Mouse

Gui, +LastFound +AlwaysOnTop +Toolwindow -Caption
Gui, Color, Red
Gui, Show, Hide w100 h100
WinSet, Region, 30-30 W40 H40 E
WinSet, Transparent, 150
return

~Ctrl::
MouseGetPos,x,y
Gui,Show,% "NA x " x-50 "y" y-50
Return

~Ctrl Up::Gui,Hide

Esc::
GuiClose:
ExitApp

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 5:50 pm 
Offline

Joined: November 18th, 2006, 7:56 pm
Posts: 305
Whoaa guys! That's it! :shock: :shock: 8)

Well done, and the core of it is basically only about ~10 lines... :)

Thanks! This will be very useful to signal certain state changes of a script to the user.

Cheers David.P


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: iDrug, Ohnitiel, Yahoo [Bot] and 26 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