angel83 Posted January 30 Share Posted January 30 Hello friends I have a problem I hope you can help me with this script. I want it to work. As soon as it arrives, after 10 seconds, it sounds a Beep every second and changes from white to red and when the time runs out a program closes, EXE thank you. timer.au3 Link to comment Share on other sites More sharing options...
argumentum Posted January 30 Share Posted January 30 _IsPressed($tecla_envia_ficha+30) and $tecla_envia_ficha=5 Read the help file, thoroughly. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
angel83 Posted January 30 Author Share Posted January 30 I'm new to this can you help me Link to comment Share on other sites More sharing options...
argumentum Posted January 30 Share Posted January 30 Help is one thing, and pleasing your desires for a product is another. Also, press "Paste as plain text instead" so the font is not so big. You need to learn if you wanna know how. Really, do read the help file. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
angel83 Posted January 30 Author Share Posted January 30 I understand and thank you. #include "cores.au3" #include <misc.au3> AdlibRegister("Clock", 1000) ; ----------------------temporizador para games--------------------- HotKeySet("{esc}", "sair") $ficha = 0 $segundos = 0 $pressionado = False $tecla_envia_ficha = 5 $dir2 = "leer timer.txt" if Not FileExists($dir2) Then FileWriteLine($dir2 , "(HORINZONTAL): numeros,centro (VERTICAL) : 0, cima, baixo (CREDITOS) TECLA :5") EndIf $dir = "Timer.ini" if Not FileExists($dir) Then IniWrite($dir, "Timer", "minutos por ficha", "1" & @crlf) ; Aqui ajusta os minutos, mas é preciso excluir o arquivo .ini antes. FileWriteLine($dir, "[Ajustar Timer]") FileWriteLine($dir, "tamanho da fonte = 30") FileWriteLine($dir, "tipo de fonte = arial") FileWriteLine($dir, "horizontal = 200") FileWriteLine($dir, "vertical = 0") FileWriteLine($dir, "largura = 200") FileWriteLine($dir, "altura = 40") EndIf $ajust = "Ajustar Timer" $minutos_por_ficha = IniRead($dir, "Timer", "minutos por ficha", "") $largura = IniRead($dir, $ajust, "largura", "") $altura = IniRead($dir, $ajust, "altura", "") $horizontal = IniRead($dir, $ajust, "horizontal", "") $vertical = IniRead($dir, $ajust, "vertical", "") $tam_fonte = IniRead($dir, $ajust, "tamanho da fonte", "") $fonte = IniRead($dir, $ajust, "tipo de fonte", "") ;Pocision de timer If $vertical == "cima" Then $vertical = 0 If $vertical == "baixo" Then $vertical = @DesktopHeight - $altura If $horizontal == "centro" Then $horizontal = @DesktopWidth/2 - $largura/2 GUICreate("Timer", $largura, $altura, $horizontal, $vertical, 0x80000000) GUISetBkColor(0x000000) GUICtrlCreateLabel("00:00:00", 0, 0, 200, 70) GUICtrlSetBkColor(-1, $COR_PRETO) GUICtrlSetColor(-1, $COR_BRANCO) GUICtrlSetFont(-1, $tam_fonte, 800, -1, $fonte) GUISetState (@SW_SHOW) While True ; Enviando Créditos If _IsPressed($tecla_envia_ficha+30) Then $pressionado = True If Not _IsPressed($tecla_envia_ficha+30) And $pressionado Then $ficha += 1 $pressionado = False EndIf $segundos += $ficha * ($minutos_por_ficha * 60) $ficha = 0 $minutos = Mod($segundos/60, 60) $horas = $segundos/3600 $display = StringFormat("%02i:%02i:%02i", $horas, $minutos, Mod($segundos, 60)) WinSetOnTop("Timer", "", 1) WEnd Func clock() If $segundos > 0 Then $segundos -= 1 EndIf GUICtrlSetData(-1, $display) EndFunc Func sair() exit EndFunc Link to comment Share on other sites More sharing options...
argumentum Posted January 30 Share Posted January 30 ...also, forum rules states: no gamming automation Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
angel83 Posted January 30 Author Share Posted January 30 👍 Link to comment Share on other sites More sharing options...
angel83 Posted January 30 Author Share Posted January 30 Just now, angel83 said: ok Link to comment Share on other sites More sharing options...
Developers Jos Posted January 30 Developers Share Posted January 30 Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team 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