n4n0 Posted December 13, 2015 Share Posted December 13, 2015 Hello, currently I have a short code without any pause in-between the loops, but even now the script performs too slow, roughly one second. Is there any way to make it more instantaneous? I tried using If WinExists but I think that is even slower. While 1 WinSetState("[CLASS:SplashScreenClassName]", "", @SW_HIDE) WinSetState("[CLASS:RiotWindowClass]", "", @SW_HIDE) WEndSecond question, if I have a code with If WinExists(...) Then statements EndIfHow can I make statements if the window hasn't existed for a given time, e.g. 60 seconds. Link to comment Share on other sites More sharing options...
Danyfirex Posted December 13, 2015 Share Posted December 13, 2015 Second question answer. Use WinWait instead.Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
n4n0 Posted December 13, 2015 Author Share Posted December 13, 2015 How exactly am I supposed to do that? The application is existing for different amount of times (5-30 seconds), but how can I make it to do statements if it hasn't existed in the last 60 seconds? A sample script would be nice. Link to comment Share on other sites More sharing options...
n4n0 Posted December 13, 2015 Author Share Posted December 13, 2015 bump Link to comment Share on other sites More sharing options...
n4n0 Posted December 13, 2015 Author Share Posted December 13, 2015 Alright, I figured out the second question myself, here's the code:Local $i = 0 While 1 If WinExists("Proc.exe") Then $i = 0 Else $i += 1 Sleep(5000) EndIf If $i = 24 Then If ProcessExists("Proc2.exe") Then ProcessClose("Proc2.exe") Sleep(5000) EndIf Run($Proc2) EndIf WEndI believe that it can be improved though, any tips? 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