CaptainBeardsEyesBeard Posted October 11, 2018 Share Posted October 11, 2018 Hey I get an error trying to parse this. I basically want the RestartElite() function to trigger every time $i is a multiple of 5. Not sure what I'm doing wrong. if $i % 5 = 0 Then RestartElite() EndIf Link to comment Share on other sites More sharing options...
Danyfirex Posted October 11, 2018 Share Posted October 11, 2018 You need to use Mod function. 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...
Skeletor Posted October 11, 2018 Share Posted October 11, 2018 ; If the modulus operation of $iNb by 2 equals to 0 then $iNb is even. If Mod($iNb, 2) = 0 Then MsgBox($MB_SYSTEMMODAL, "", $iNb & " is an even number.") Else MsgBox($MB_SYSTEMMODAL, "", $iNb & " is an odd number.") EndIf Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI Link to comment Share on other sites More sharing options...
Gianni Posted October 11, 2018 Share Posted October 11, 2018 ....in few words, using mod($i, 5) you will get a rest of 0 when $i is a multiple of the second parameter (5 here). In your case this should work: if Not Mod($i, 5) Then RestartElite() EndIf Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... 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