Guest Beakman Posted April 27, 2005 Share Posted April 27, 2005 Hey guys, I have a few questions, answer what you wish. :-P I was wondering I there is a way to make labels over another application. To be more specific, there will be a game in full screen mode and I want a (transparent) label to overlap the game displaying a string variable or something. It doesnt necessarily need to be a label, just text overlapping the current application, while that application still playable? Also, is this possible for the other GUI things like buttons? Also, there anyways to input variables, like numbers or strings? Another thing, is there a way to declare variables from lines in a text document or something? Like a config file? Example: blah.text consists of: Hello Blah hey Then I could do something like $one = first line from text document $two = 2nd line from text document $three = 3rd line from text document I appreciate any help. Thanks. Link to comment Share on other sites More sharing options...
layer Posted April 27, 2005 Share Posted April 27, 2005 (edited) I was wondering I there is a way to make labels over another application. To be more specific, there will be a game in full screen mode and I want a (transparent) label to overlap the game displaying a string variable or something. It doesnt necessarily need to be a label, just text overlapping the current application, while that application still playable?Yes. You have two options, which I will explain.This is from Larry:Send("#r") If Not WinWait("Run","",5) Then Exit $hWnd = WinGetHandle("Run") $x = DLLCall("user32.dll","int","GetDC","hwnd",$hWnd) DLLCall("gdi32.dll","int","TextOut","int",$x[0],"int",0,"int",0,"str","Larry Rocks!!!","int",14) DLLCall("user32.dll","int","ReleaseDC","int",$x[0])Also, is this possible for the other GUI things like buttons? Also, there anyways to input variables, like numbers or strings?Yes. This is from Valik...:#include <GUIConstants.au3> Main() Func Main() Send("#r") WinWait("Run") Local $hWnd = WinGetHandle("Run") Local $hRealButton = ControlGetHandle($hWnd, "", "Button4") Local $aControl = ControlGetPos($hWnd, "", $hRealButton) ControlHide($hWnd, "", $hRealButton) GUICreate("Blah", $aControl[2], $aControl[3], $aControl[0], $aControl[1], $WS_CHILD, -1, $hWnd) Local $hFakeButton = GUICtrlCreateButton("My Browse", 0, 0, $aControl[2], $aControl[3]) GUISetState(@SW_SHOW) While WinExists($hWnd) Local $msg = GUIGetMsg() If $msg = $hFakeButton Then MsgBox(4096, "", "My Button!") ControlClick($hWnd, "", $hRealButton) EndIf WEnd EndFunc; Main()Notice the button Browse is now "MyBrowse"?Another thing, is there a way to declare variables from lines in a text document or something?Like a config file?Example: blah.text consists of:HelloBlahheyThen I could do something like$one = first line from text document$two = 2nd line from text document$three = 3rd line from text documentI appreciate any help. Thanks.<{POST_SNAPBACK}>Yes, make an array. There is a function called _FileReadToArray() ...EDIT: Also, if you want the newly created window to stay on top of the game window, don't for get to "WinSetOnTop" the newly created window. Edited April 27, 2005 by layer FootbaG 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