| View previous topic :: View next topic |
| Author |
Message |
Kahz
Joined: 12 Sep 2005 Posts: 190
|
Posted: Sun Aug 20, 2006 7:22 am Post subject: Drawing on top of a fullscreen d3d app? |
|
|
Can AHK draw images on top of a game running in fullscreen?
For example, if I wanted to create my own toolbar of hotkeys. Or make a transparant overlay of an image alerting me to something.
Last edited by Kahz on Sun Aug 20, 2006 12:34 pm; edited 1 time in total |
|
| Back to top |
|
 |
Sean'sPen Guest
|
Posted: Sun Aug 20, 2006 9:03 am Post subject: |
|
|
 |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Sun Aug 20, 2006 9:06 am Post subject: |
|
|
That's A Hot Key!! Isn't it? Issue solved.  |
|
| Back to top |
|
 |
Guest
|
Posted: Sun Aug 20, 2006 9:06 am Post subject: |
|
|
And you can even make crosshair with that great tool!
 |
|
| Back to top |
|
 |
Kahz
Joined: 12 Sep 2005 Posts: 190
|
Posted: Sun Aug 20, 2006 10:03 am Post subject: |
|
|
I'm serious. Obviously you are not. o_O
Perhapse a better question would be:
Can autohotkey draw images on top of a fullscreen d3d application.
I don't appreciate some of the rude comments made. My question is valid.
Last edited by Kahz on Sun Aug 20, 2006 10:09 am; edited 1 time in total |
|
| Back to top |
|
 |
TDMedia
Joined: 26 Nov 2005 Posts: 195
|
Posted: Sun Aug 20, 2006 10:09 am Post subject: |
|
|
You can make a splash window that is transparent, but if you ever get to the point where you click on it, the game will be minimized. You can overcome this by making the LButton a hotkey that returns if it's within the bounds of the window's area, or simply by making the hotkey send only to the game window (which I've had varying levels of success with.) Commands of interest are:
- SendMode
- SplashWindow
- WinSet
- ControlSend
All of these are, of course, in the help file. |
|
| Back to top |
|
 |
Kahz
Joined: 12 Sep 2005 Posts: 190
|
Posted: Sun Aug 20, 2006 10:10 am Post subject: |
|
|
| Ahh, wonderful. Thank you so much. ^^ |
|
| Back to top |
|
 |
TDMedia
Joined: 26 Nov 2005 Posts: 195
|
Posted: Sun Aug 20, 2006 10:12 am Post subject: |
|
|
If you have any problems, post back here and I'll do what I can to help. Another method you may need to employ is turning OFF AlwaysOnTop for the game itself (some games like to grab that status.)
Last edited by TDMedia on Sat Sep 09, 2006 7:40 pm; edited 1 time in total |
|
| Back to top |
|
 |
Kahz
Joined: 12 Sep 2005 Posts: 190
|
Posted: Sun Aug 20, 2006 10:15 am Post subject: |
|
|
| There is no SplashWindow in the documentation. Did you mean SplashImage? |
|
| Back to top |
|
 |
TDMedia
Joined: 26 Nov 2005 Posts: 195
|
Posted: Sun Aug 20, 2006 10:23 am Post subject: |
|
|
Oh... yeah. Sorry, I suppose it's too late for me . That's for an image, of course. You can also use SplashTextOn/Off to use a text window. |
|
| Back to top |
|
 |
Harmor
Joined: 06 Nov 2005 Posts: 183
|
Posted: Sun Aug 20, 2006 11:06 am Post subject: |
|
|
I got the window displaying, but it immediately disappears.
I then made a loop and redrew it, but the drawing is flickered.
| Code: | $8::
Loop {
SplashImage C:\crosshair.gif, b
WinSet, AlwaysOnTop, On
WinSet, TransColor, White
Sleep 1
}
return
|
_________________ //TODO: Create kewl sig... |
|
| Back to top |
|
 |
TDMedia
Joined: 26 Nov 2005 Posts: 195
|
Posted: Sun Aug 20, 2006 11:12 am Post subject: |
|
|
| Have you tried un-setting AlwaysOnTop for the game? That may help (some games are very persistent, though.) |
|
| Back to top |
|
 |
Harmor
Joined: 06 Nov 2005 Posts: 183
|
Posted: Sun Aug 20, 2006 11:19 am Post subject: |
|
|
I got the window displaying, but it immediately disappears.
I then made a loop and redrew it, but the drawing is flickered.
| Code: | ;
; Returns 1 if %a_szKeyName% is being pressed, otherwise 0
;
IsKeyPressed(a_szKeyName)
{
GetKeyState, state, %a_szKeyName%, P
If state = D ; The key is not being pressed
{
Return 1
}
Return 0
}
$8::
SplashImage C:\crosshair.gif, b
WinSet, TransColor, White
WinSet, Topmost , On
Loop {
if( IsKeyPressed("8"))
{
SplashImage C:\crosshair.gif, b
Sleep 1
}
else
{
break
}
}
SplashImage C:\crosshair.gif, b Hide
return
|
Also, for some reason, the image isn't centered...but I can get around that by just offsetting the crosshair.
Immediately after I do: SplashImage C:\crosshair.gif, b, which makes a borderless window appear in the center of the screen, the window disappears.
Any help would be appreciated. _________________ //TODO: Create kewl sig... |
|
| Back to top |
|
 |
Kahz
Joined: 12 Sep 2005 Posts: 190
|
Posted: Sun Aug 20, 2006 11:54 am Post subject: |
|
|
I think it has more to do with drawing on top of a fullscreen d3d window. I have the same problem trying to display my splash on top of a tech demo.
Try testing your script on this one:
http://http.de.scene.org/pub/demos/groups/farb-rausch/bp04invi.zip
Have you had any luck with doing this, TDMedia? |
|
| Back to top |
|
 |
TDMedia
Joined: 26 Nov 2005 Posts: 195
|
Posted: Sun Aug 20, 2006 12:17 pm Post subject: |
|
|
| I play mainly OpenGL games, and in those, overlaying a crosshair, or just about anything hasn't been a real problem for me. So, if your game has an OGL mode, try that. If not, I'll have to do some testing and see if anything can be done to overcome the games' persistence. |
|
| Back to top |
|
 |
|