inferno8 Posted June 9, 2011 Posted June 9, 2011 Hello there Dear members, first of all u would like to apologize myself for my bad English i know i am not good but i do my best. I have a question about my program , the idea is to make around 6 timers run and play a .wav sound when they are finished. they need to be started with a hotkey like in my example "v" when pressed the pre installed "timer" counts. I made this time like i make my timers in my automations software for machines ( SIEMENS S7 V5.5 for automating machines. The problem is that the times does not start counting when i press V when im in the game in full screen mode. But when i am in for example Firefox or windows media player and i press the key it does count. So the question is how could i make this timer do start in my full screen mode game without using alt+tab keys. And also important i dont want to get out of the game. Thats why i used soundplay function so it plays in the background. I also tried to use file install function in a temp directory and add the .wav file but then it doesn't play the sound anymore :s . Anyway thanks in advance for anyone that just takes his time to look at my program (nooby program ) expandcollapse popupFileInstall ("C:\Users\Yannick Saman\Desktop\bleu buff.wma", "C:\bleu buff.mwa" ) $1 = 0 $msgbox1 = MsgBox (4 , "Buff timer made by yannick","do you want the buff timer to start" ) if $msgbox1 = 7 then Exit EndIf #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:\Users\Yannick Saman\Desktop\programing\Bleubuff\Gui.kxf $Form1 = GUICreate("Form1", 625, 443, 752, 317) $Start = GUICtrlCreateButton("Start", 0, 416, 75, 25, $WS_GROUP) $Exit = GUICtrlCreateButton("Close", 544, 416, 75, 25, $WS_GROUP) $Label1 = GUICtrlCreateLabel("This is the timer for bleu buff south", 64, 128, 168, 17) $Progress1 = GUICtrlCreateProgress(72, 160, 150, 17) GUICtrlSetColor(-1, 32250) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $s = 0 While 1 $hotk = HotKeySet ("v", "test") $msg = GUIGetMsg() ; listen for a message. If $msg = $Exit Then ; if exit is pressed, then exit the script. Exit EndIf If $msg = $Start Then ; if this button is pushed, we navigate the object to the game site. For $i = $s To 100 $s = 0 GUICtrlSetData($progress1, $i) sleep (2700) Next If $i > 100 Then GUICtrlSetData ($Progress1 , $1 ) SoundPlay ("C:\test\bleu buff.wma" ,1) SoundPlay ("",1) EndIf EndIf WEnd Func test () For $i = $s To 100 $s = 0 GUICtrlSetData($progress1, $i) sleep (2700) Next If $i > 100 Then GUICtrlSetData ($Progress1 , $1 ) SoundPlay ("C:\test\bleu buff.wma" ,1) SoundPlay ("",1) EndIf EndFunc
Developers Jos Posted June 9, 2011 Developers Posted June 9, 2011 So the question is how could i make this timer do start in my full screen mode game without using alt+tab keys.Please read the forum rules.Jos 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.
Recommended Posts