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 

Drawing on top of a fullscreen d3d app?
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Kahz



Joined: 12 Sep 2005
Posts: 190

PostPosted: Sun Aug 20, 2006 7:22 am    Post subject: Drawing on top of a fullscreen d3d app? Reply with quote

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
View user's profile Send private message
Sean'sPen
Guest





PostPosted: Sun Aug 20, 2006 9:03 am    Post subject: Reply with quote

Back to top
BoBo
Guest





PostPosted: Sun Aug 20, 2006 9:06 am    Post subject: Reply with quote

That's A Hot Key!! Isn't it? Issue solved. Cool
Back to top
Guest






PostPosted: Sun Aug 20, 2006 9:06 am    Post subject: Reply with quote

And you can even make crosshair with that great tool!

Back to top
Kahz



Joined: 12 Sep 2005
Posts: 190

PostPosted: Sun Aug 20, 2006 10:03 am    Post subject: Reply with quote

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
View user's profile Send private message
TDMedia



Joined: 26 Nov 2005
Posts: 195

PostPosted: Sun Aug 20, 2006 10:09 am    Post subject: Reply with quote

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
View user's profile Send private message
Kahz



Joined: 12 Sep 2005
Posts: 190

PostPosted: Sun Aug 20, 2006 10:10 am    Post subject: Reply with quote

Ahh, wonderful. Thank you so much. ^^
Back to top
View user's profile Send private message
TDMedia



Joined: 26 Nov 2005
Posts: 195

PostPosted: Sun Aug 20, 2006 10:12 am    Post subject: Reply with quote

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
View user's profile Send private message
Kahz



Joined: 12 Sep 2005
Posts: 190

PostPosted: Sun Aug 20, 2006 10:15 am    Post subject: Reply with quote

There is no SplashWindow in the documentation. Did you mean SplashImage?
Back to top
View user's profile Send private message
TDMedia



Joined: 26 Nov 2005
Posts: 195

PostPosted: Sun Aug 20, 2006 10:23 am    Post subject: Reply with quote

Oh... yeah. Sorry, I suppose it's too late for me Razz. That's for an image, of course. You can also use SplashTextOn/Off to use a text window.
Back to top
View user's profile Send private message
Harmor



Joined: 06 Nov 2005
Posts: 183

PostPosted: Sun Aug 20, 2006 11:06 am    Post subject: Reply with quote

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
View user's profile Send private message
TDMedia



Joined: 26 Nov 2005
Posts: 195

PostPosted: Sun Aug 20, 2006 11:12 am    Post subject: Reply with quote

Have you tried un-setting AlwaysOnTop for the game? That may help (some games are very persistent, though.)
Back to top
View user's profile Send private message
Harmor



Joined: 06 Nov 2005
Posts: 183

PostPosted: Sun Aug 20, 2006 11:19 am    Post subject: Reply with quote

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
View user's profile Send private message
Kahz



Joined: 12 Sep 2005
Posts: 190

PostPosted: Sun Aug 20, 2006 11:54 am    Post subject: Reply with quote

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
View user's profile Send private message
TDMedia



Joined: 26 Nov 2005
Posts: 195

PostPosted: Sun Aug 20, 2006 12:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
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