Terenz Posted October 8, 2016 Share Posted October 8, 2016 There is a better way to write this sort of pseudo-code? Local $aTEST[4] = [True,False,False,True] For $i = 0 To UBound($aTEST) - 1 If $aTEST[$i] = True Then ConsoleWrite(False & @CRLF) ; MyFunc1(False) ; MyFunc2(False) ; MyFunc3(False) ; MyFunc4(False) ; MyFunc5(False) ; MyFunc6(False) ; MyFunc7(False) ; MyFunc8(False) ElseIf $aTEST[$i] = False Then ConsoleWrite(True & @CRLF) ; MyFunc1(True) ; MyFunc2(True) ; MyFunc3(True) ; MyFunc4(True) ; MyFunc5(True) ; MyFunc6(True) ; MyFunc7(True) ; MyFunc8(True) EndIf Next Thanks Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
InunoTaishou Posted October 8, 2016 Share Posted October 8, 2016 Local $aTEST[4] = [True,False,False,True] For $i = 0 To UBound($aTEST) - 1 MyFunc1(Not $aTEST[$i]) MyFunc2(Not $aTEST[$i]) MyFunc3(Not $aTEST[$i]) MyFunc4(Not $aTEST[$i]) MyFunc5(Not $aTEST[$i]) MyFunc6(Not $aTEST[$i]) MyFunc7(Not $aTEST[$i]) MyFunc8(Not $aTEST[$i]) Next Link to comment Share on other sites More sharing options...
Terenz Posted October 8, 2016 Author Share Posted October 8, 2016 You have right, "Not" convert True to False e False to True. Thanks Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
Danyfirex Posted October 8, 2016 Share Posted October 8, 2016 I prefer to do the operation Not inside the 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...
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