JScript Posted January 27, 2011 Share Posted January 27, 2011 How could I become a part of a script more simple and efficient? Example: Func _BroadcastMsg($sMessage = "", $sSendID = "#SendMsg", $iPort = -1, $lAllCmp = False) If $iPort = -1 Then $iPort = $iMsgPort For $i = 1 To $aCmpList[0][0] If $aCmpList[$i][3] = 10 Or $aCmpList[$i][1] = @ComputerName Then ContinueLoop If $lAllCmp = False Then If $aCmpList[$i][3] = 4 Or $aCmpList[$i][3] = 5 Or $aCmpList[$i][3] = 10 Or $aCmpList[$i][1] = @ComputerName) Then ContinueLoop EndIf _AdlibEnable("_SendMsg", $aCmpList[$i][1] & "|" & $iPort & "|" & $sMessage & "|" & $sSendID, 1000, 1) Next EndFunc ;==>_BroadcastMsg Thanks to whoever can help me. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 27, 2011 Share Posted January 27, 2011 Your $aCmpList[$i][3] = 10 Or $aCmpList[$i][1] = @ComputerName has already been checked, so don't repeat it inside the If $lAllCmp = False part. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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