 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
rookie Guest
|
Posted: Fri Mar 19, 2010 2:09 pm Post subject: Q: Laserbeam |
|
|
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
|
Posted: Fri Mar 19, 2010 4:07 pm Post subject: |
|
|
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
|
Posted: Fri Mar 19, 2010 10:05 pm Post subject: |
|
|
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  |
|
| Back to top |
|
 |
tidbit
Joined: 09 Mar 2008 Posts: 1807 Location: Minnesota, USA
|
Posted: Fri Mar 19, 2010 10:10 pm Post subject: |
|
|
to draw a line (lets say a red laser beam) you should use GDI+.
it's a bit confusing, so good luck (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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|