BloodRain Posted November 29, 2014 Share Posted November 29, 2014 (edited) Sorry for my English but I have question: My Script designed for loops press some key if tab name "Tab Press key" activated. But if I hide this tab, script not run in hide process. How to? That my code: expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.10.2 Author: BloodRain Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here HotKeySet("^z", "a") HotKeySet("^x", "b") HotKeySet("^c", "c") HotKeySet("^v", "ex") Local $Timer1, $Delay1 = 100 Local $Timer2, $Delay2 = 5000 While 1 Sleep(100) WEnd Func a() WinWaitActive('Tab Press key'); Sleep(1000); While 1 If $Timer1 = '' Or TimerDiff($Timer1) > $Delay1 Then $Timer1 = TimerInit() Action1() EndIf If $Timer2 = '' Or TimerDiff($Timer2) > $Delay2 Then $Timer2 = TimerInit() Action2() EndIf ; Briefly pause to avoid excessive CPU usage Sleep(100) WEnd EndFunc Func b() WinSetState('Tab Press key', '', @SW_HIDE); EndFunc Func c() WinSetState('Tab Press Key', '', @SW_SHOW); EndFunc Func Action1() Local $arr[] = ["{LEFT}", "{DOWN}", "{RIGHT}", "{UP}"] Sleep(100) $i = Random(0, 3, 1) Send($arr[$i]) EndFunc Func Action2() MouseClick("left", 359, 623) EndFunc Func ex() Exit 0; EndFunc Please help! Edited November 29, 2014 by BloodRain Link to comment Share on other sites More sharing options...
Hidix17 Posted November 29, 2014 Share Posted November 29, 2014 Add #NoTrayIcon Link to comment Share on other sites More sharing options...
BloodRain Posted November 29, 2014 Author Share Posted November 29, 2014 Add #NoTrayIcon Tks but I mean example if Firefox with tab "Tab Press Key" hide using WinSetState('Tab Press key', '', @SW_HIDE); then script not run on it! I have to showing tab "Tab Press Key". I need script run with Firefox hidden! Link to comment Share on other sites More sharing options...
BloodRain Posted November 29, 2014 Author Share Posted November 29, 2014 helpppppppppppppppppp meeeeeeeeeeeeeeeeeeeee pleaseeeeeeeeeeeeeeeeeeeeeeee! Link to comment Share on other sites More sharing options...
Developers Jos Posted November 29, 2014 Developers Share Posted November 29, 2014 helpppppppppppppppppp meeeeeeeeeeeeeeeeeeeee pleaseeeeeeeeeeeeeeeeeeeeeeee! Please read our forumrules in relation to bumping threads. As far as I understand your question you want the impossible, 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. Link to comment Share on other sites More sharing options...
BloodRain Posted November 29, 2014 Author Share Posted November 29, 2014 Please read our forumrules in relation to bumping threads. As far as I understand your question you want the impossible, Jos Thank you, it's work now, but WinSetStage hide not work on Firefox: hiden some seconds and auto show =(( expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.10.2 Author: BloodRain Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here HotKeySet("^{F1}", "a") HotKeySet("^{F2}", "b") HotKeySet("^{F3}", "c") HotKeySet("^{F4}", "ex") Local $Timer1, $Delay1 = 100 Local $Timer2, $Delay2 = 9000 While 1 Sleep(100) WEnd Func a() WinWaitActive('Tab Press key') Sleep(2000) While 1 If $Timer1 = '' Or TimerDiff($Timer1) > $Delay1 Then $Timer1 = TimerInit() Action1() EndIf If $Timer2 = '' Or TimerDiff($Timer2) > $Delay2 Then $Timer2 = TimerInit() Action2() EndIf ; Briefly pause to avoid excessive CPU usage Sleep(10) WEnd EndFunc Func b() WinSetState("Tab Press key", "", @SW_HIDE) EndFunc Func c() WinSetState("Tab Press key", "", @SW_SHOW) EndFunc Func Action1() Local $arr[4] = ["{UP}", "{LEFT}", "{DOWN}", "{RIGHT}"] Sleep(100) $i = Random(0, 3, 1) ControlSend("Tab Press key", "", "" , $arr[$i]) EndFunc Func Action2() ControlClick("Tab Press key", "", "", "left", 1, 357, 661) EndFunc Func ex() Exit 0; EndFunc 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