AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Q: Laserbeam

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
rookie
Guest





PostPosted: Fri Mar 19, 2010 2:09 pm    Post subject: Q: Laserbeam Reply with quote

Hi there,

i want to draw a "laserbeam".

The beam should be 100 pixel long.
Starting point of the beam should be at y=100 und x=mousemove left or right.
Everytime i move the mouse, the beam should follow the new coordinates.


Is this possible?
Back to top
answer4u
Guest





PostPosted: Fri Mar 19, 2010 4:07 pm    Post subject: Reply with quote

Something like this?
Code:
Gui, -Caption +ToolWindow
Gui, Color, Red
CoordMode, Mouse, Screen
Loop {
   MouseGetPos, X
   Gui, Show, NA x%X% y100 w100 h2
}
Back to top
Rookie
Guest





PostPosted: Fri Mar 19, 2010 10:05 pm    Post subject: Reply with quote

Thanks for the answer, but that isn't it what i'm looking for.

Imagine a pooltable, on the top of the cue is a laserpointer
If i rotate the cue, the beam should show me the direction (as an extension of the cue)

Next problem i have, and that's why i could'nt use your script:
Let's say i have these coordinates:
x100 y100 -> beam to x100 y500

With your script no problem. But:
x100 y100 -> beam to x200 y500
This does'nt work Sad
Back to top
tidbit



Joined: 09 Mar 2008
Posts: 1807
Location: Minnesota, USA

PostPosted: Fri Mar 19, 2010 10:10 pm    Post subject: Reply with quote

to draw a line (lets say a red laser beam) you should use GDI+.
it's a bit confusing, so good luck Smile (don't ask me, i never tried it).
GDI+ standard library 1.30 by tic
_________________
rawr. be very afraid
*poke*
Note: My name is all lowercase for a reason.
Even monkeys fall from trees. - Japanese proverb
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group