angel83 Posted March 21 Share Posted March 21 Hi, I hope that you can help me. I'm having a problem with the countdown timer disappearing in some programs that use OpenGL. When I start the program, my timer disappears, I exit the program and it's there. Not all programs do it like those that use Direct3D, Directdraw or Directx, only those that use OpenGL do it. Link to comment Share on other sites More sharing options...
Andreik Posted March 21 Share Posted March 21 And how is this related to AutoIt? When the words fail... music speaks. Link to comment Share on other sites More sharing options...
angel83 Posted March 21 Author Share Posted March 21 The timer made in autoit when displayed on the screen works but when I open a program that works with opengl the timer is not seen. Link to comment Share on other sites More sharing options...
Nine Posted March 21 Share Posted March 21 Show the code that creates the timer. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
angel83 Posted March 21 Author Share Posted March 21 AdlibRegister("Clock", 1000) HotKeySet("{esc}", "exit1") $seconds = 60 GUICreate("Timer", 181, 50) GUISetBkColor(0x000000) GUICtrlCreateLabel("00:00:00", 10, 0, 200, 70) GUICtrlSetFont(-1, 30, 800) GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetColor(-1, 0xFFFFFF) GUISetState(@SW_SHOW) While True $minutes = Mod($seconds / 60, 60) $hours = $seconds / 3600 $display = StringFormat("%02i:%02i:%02i", $hours, $minutes, Mod($seconds, 60)) WinSetOnTop("Timer", "", 1) WEnd Func clock() If $seconds = 30 Then SoundPlay(@WindowsDir & "\media\tada.wav") EndIf If $seconds < 10 And $seconds > 0 Then SoundPlay(@WindowsDir & "\media\ding.wav") If Mod($seconds, 2) = 0 Then GUICtrlSetColor(-1, 0xff0000) Else GUICtrlSetColor(-1, 0xffffff) EndIf EndIf If $seconds = 0 Then SoundPlay(@WindowsDir & "\media\Ring01.wav") EndIf If $seconds > 0 Then $seconds -= 1 EndIf GUICtrlSetData(-1, $display) EndFunc ;==>clock Func exit1() Exit EndFunc ;==>exit1 Link to comment Share on other sites More sharing options...
Nine Posted March 21 Share Posted March 21 When you post code, please use the method described in the link. Thanks. Your code looks good, if that does not work with opengl windows, try using : One comment on your script, you should put a small sleep inside your main loop to reduce cpu consumption. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
angel83 Posted March 21 Author Share Posted March 21 It doesn't work for me. any other way to see the timer in opengl windows Link to comment Share on other sites More sharing options...
Andreik Posted March 21 Share Posted March 21 Tell us what program are you talking about? When the words fail... music speaks. Link to comment Share on other sites More sharing options...
rsn Posted March 21 Share Posted March 21 If I had to guess, the app is using a hardware overlay (full screen perhaps?) and obscuring any and all other windows. The way to test that is to try a screen capture. If the app is not captured, then it's an overlay and not much to be done about it aside from using a secondary monitor to display the timer or forcing the app to run in windowed mode (if it supports that). Link to comment Share on other sites More sharing options...
angel83 Posted March 21 Author Share Posted March 21 I understand the forum rules. I can't find another example to explain it to you. : I have 5 computers that I rent. When playing certain games, some do watch the timer, but not others. Checking it I realized that those who use opengl don't look. I do this to control time. Using my rental computer Link to comment Share on other sites More sharing options...
Developers Jos Posted March 21 Developers Share Posted March 21 (edited) So you understand the rules and then you go on saying you want to use this stuff for game automation.. really? So explain please! Ps: all others please stay out for now. Edited March 21 by Jos A-Team 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 22 Developers Share Posted March 22 Ignoring my question will not work, so what is your answer? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
angel83 Posted March 23 Author Share Posted March 23 Hello, I think I didn't explain myself well. An apology for that since my English is not good. Jos, what I meant is that I have the computers in an Internet cafe and I rent them for a certain period of time. My clients tell me they don't look at my remaining screen time. That happens when they play or when they are on the internet or doing works shool, etc. The timer is for my clients to see the time they have left to use the PC. but thanks to everyone. problem solved Link to comment Share on other sites More sharing options...
Nine Posted March 23 Share Posted March 23 1 hour ago, angel83 said: problem solved Fine. But since you asked us for help, the least you could do is to tell us how you solved your issue. I am sure community would appreciate an explanation. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Developers Jos Posted March 23 Developers Share Posted March 23 4 hours ago, Nine said: Fine. But since you asked us for help, the least you could do is to tell us how you solved your issue. Though we had an agreement not to post in threads that aren't cleared after we request to stay out? On 3/21/2024 at 9:02 PM, Jos said: Ps: all others please stay out for now. 5 hours ago, angel83 said: The timer is for my clients to see the time they have left to use the PC. This is a somewhat strange explanation after your first vague comment about being familiar with our forum rules, but since you have solved it, I will close this thread. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts