holly Posted July 25, 2012 Share Posted July 25, 2012 Hi all, i'm a newbie and my name is Holly, nice to meet all I'd like to put a gui over a game, it's not game automation, i need only a timer for remember me when to stop playing Searching on the web, i have find only dll hoocking but today i have see a post can resolve my problem:I created a timer window and set it as a child to the full screen window, then added a style so that the child wouldn't take focus over the parent.You most likely need to set +WS_CHILD -WS_POPUP for the child window. For instance:Gui, 1:+LastFoundhwnd1 := WinExist()Gui, 2:+LastFoundGui, 2:+0x40000000 -0x80000000 ; Add WS_CHILD, remove WS_POPUPhwnd2 := WinExist()DllCall("SetParent", "uint", hwnd2, "uint", hwnd1)Gui, 2:Show, x0 y0 w200 h200, GUI 2Gui, 1:Show, w400 h400, GUI 1returnGuiClose:ExitAppIf you uncomment the Gui, 2:+0x4... line, GUI 2 is set as the foreground window whenever you try to focus GUI 1. Pressing Alt+F4 closes GUI 2 (or does nothing if it's already closed), and pressing GUI 1's close button doesn't work. After adding WS_CHILD and removing WS_POPUP, AHK Window Info shows that GUI 1 is the foreground/active window, and GUI 2 is the focused control. MSDN wrote: For compatibility reasons, SetParent does not modify the WS_CHILD or WS_POPUP window styles of the window whose parent is being changed. Therefore, if hWndNewParent is NULL, you should also clear the WS_CHILD bit and set the WS_POPUP style after calling SetParent. Conversely, if hWndNewParent is not NULL and the window was previously a child of the desktop, you should clear the WS_POPUP style and set the WS_CHILD style before calling SetParent. Example image:http://i50.tinypic.com/mvp3tf.jpgI'm searching for someone can convert the 11 lines of AutoHotKey into autoit language.Pleeeeeeeeeeese Holly Link to comment Share on other sites More sharing options...
DicatoroftheUSA Posted July 25, 2012 Share Posted July 25, 2012 (edited) I would go at it at a different approach. I would make a script that at a time, or after a set time it starts dinging at you just annoyingly enough to get you to exit the game to close it. Don't want to loose to uber boss just because a window popped up on you. I have a clock/egg timer script at home, I might post it later. Edited July 25, 2012 by DicatoroftheUSA Statism is violence, Taxation is theft. Autoit Wiki Link to comment Share on other sites More sharing options...
bogQ Posted July 25, 2012 Share Posted July 25, 2012 We dont do personal requestsBut did you ask yourself what will autoit help file do if you type in its searchWinExist, or gui, or DllCall or SetParent? TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
JohnOne Posted July 25, 2012 Share Posted July 25, 2012 AutoIt + Game = Not Allowed. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
czardas Posted July 25, 2012 Share Posted July 25, 2012 You don't need a GUI to remind you when to stop playing a game. If you want to create a timed alarm then I would use some kind of annoying beeping sound to remind you. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
bogQ Posted July 25, 2012 Share Posted July 25, 2012 (edited) something like $oShell = ObjCreate("SAPI.SpVoice") ; Get the Windows SAPI Object $oShell.Speak("30 minutes of playing left.") well it's more like annoying voice than a sound, but it will work Edited July 25, 2012 by bogQ czardas 1 TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 25, 2012 Moderators Share Posted July 25, 2012 I am using that for every rule-breaking post from now on. $oShell = ObjCreate("SAPI.SpVoice") ; Get the Windows SAPI Object $oShell.Speak("I will not break the forum rules. I will not break the forum rules!") "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
czardas Posted July 25, 2012 Share Posted July 25, 2012 (edited) @bogQ I think 30 minutes is a bit excessive. I don't understand AutoHotKey anyway.EditJust sayin' what JohnOne said: there's plenty of people here who will help you, providing the code doesn't interact with a game in any way whatsoever. Edited July 25, 2012 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
trancexx Posted July 25, 2012 Share Posted July 25, 2012 I just want to say that at this point I'm completely disappointed in AHK. I was planning to get familiar with that language at some near future but seeing that example I think I'll pass. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Zedna Posted July 25, 2012 Share Posted July 25, 2012 (edited) Interesting stuff. In AutoIt there are these functions as alternatives for AHK ones: WinGetHandle() WinExists() _WinAPI_SetParent() _WinAPI_SetWindowLong() + $GWL_STYLE WinSetState() + @SW_SHOW WinMove() So just look into helpfile at these functions and their examples ... Edited July 25, 2012 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search 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