Traddles Posted February 28, 2007 Share Posted February 28, 2007 I want to write a script that involves drawing on another applications window (or at least giving the appearence of doing so) is there a way to do this, or a way to make my window invisible (so I can see through it to what's behind it) and just draw visibly on my window? Link to comment Share on other sites More sharing options...
PaulIA Posted February 28, 2007 Share Posted February 28, 2007 I want to write a script that involves drawing on another applications window (or at least giving the appearence of doing so) is there a way to do this, or a way to make my window invisible (so I can see through it to what's behind it) and just draw visibly on my window?Fairly simple. You'll need Auto3Lib for the API calls: #include <A3LWinAPI.au3> Global $hWnd, $hDC, $tRect Run("Notepad.exe") _Lib_WinWaitActive("Untitled - Notepad") $hWnd = WinGetHandle("Untitled - Notepad") if @Error then _Lib_ShowError("Unable to get Notepad window handle") $hDC = _API_GetDC($hWnd) $tRect = __tagRECT() _tagSetData($tRect, "Left" , 100) _tagSetData($tRect, "Top" , 100) _tagSetData($tRect, "Right" , 400) _tagSetData($tRect, "Bottom", 160) _API_DrawText($hDC, "DrawText demo", $tRect, 0) Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Traddles Posted February 28, 2007 Author Share Posted February 28, 2007 (edited) what is A3LWinAPI.au3? I couldn't find any documentation for it or even the actual file. Edited February 28, 2007 by Traddles Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 1, 2007 Moderators Share Posted March 1, 2007 what is A3LWinAPI.au3? I couldn't find any documentation for it or even the actual file.Look in his signature Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Traddles Posted March 1, 2007 Author Share Posted March 1, 2007 ahhh, I searched around the forums and saw that file, I didn't know that A3LWinAPI.au3 was a part of that package... thanks for your help guys, I'll have to go mess around with that api for a while. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now