Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/28/2020 in all areas

  1. Danyfirex

    How to? AU3 --> C++

    @markyrocks You're issue is so you must define them like: class Myclass { public: static std::string str; }; std::string Myclass::str="Hello World"; int main() { std::cout << Myclass::str << "\n"; Myclass::str="Hola Mundo"; Myclass obj; std::cout << obj.str << "\n"; return 0; } Saludos
    1 point
  2. I have updated the example in the wiki. It now detecs keyword Null and allows to replace it with "" if $bFix is set accordingly.
    1 point
  3. As I understand from the helpfile you now have to use: If IsKeyword($vVariable) = $KEYWORD_NULL Then ...
    1 point
  4. @seadoggie01 I changed the function like this. You now always get an error message when the first recipient is empty. Be it from the first parameter being a string or an array. ; #FUNCTION# ==================================================================================================================== ; Name ..........: _OL_ItemRecipientCheck ; Description ...: Checks one/more recipients to be valid. ; Syntax.........: _OL_ItemRecipientCheck($oOL, $vP1[, $sP2 = ""[, $sP3 = ""[, $sP4 = ""[, $sP5 = ""[, $sP6 = ""[, $sP7 = ""[, $sP8 = ""[, $sP9 = ""[, $vP10 = ""[, $bOnlyValid = False[, $bStrict = True]]]]]]]]]]]) ; Parameters ....: $oOL - Outlook object returned by a preceding call to _OL_Open() ; $vP1 - Name, Alias or SMTP mail address of one or multiple recipients separated by ";" ($sP2 to $vP10 are ignored if ";" is used) ; +or a zero based one-dimensional array with unlimited number of recipients ; $sP2 - Optional: Name, Alias or SMTP mail address of a single recipient (no concatenation of recipients using ";" allowed) ; $sP3 - Optional: Same as $sP2 ; $sP4 - Optional: Same as $sP2 ; $sP5 - Optional: Same as $sP2 ; $sP6 - Optional: Same as $sP2 ; $sP7 - Optional: Same as $sP2 ; $sP8 - Optional: Same as $sP2 ; $sP9 - Optional: Same as $sP2 ; $vP10 - Optional: Same as $sP2 ; $bOnlyValid - Optional: Only return the resolved recipient objects in a one-dimensional zero based array (default = False) ; $bStrict - Optional: Does a strict and not just a left to right comparison. Please see Remarks (default = True) ; Return values .: Success - two-dimensional one based array with the following information (for $bOnlyValid = False): ; |0 - Recipient derived from the list of recipients in $vP1 ; |1 - True if the recipient could be resolved successfully ; |2 - Recipient object as returned by the Resolve method ; |3 - AddressEntry object ; |4 - Recipients mail address (empty for distribution lists). This can be: ; | PrimarySmtpAddress for an Exchange User ; | Email1Address for an Outlook contact ; | Empty for Exchange or Outlook distribution lists ; |5 - Display type is one of the OlDisplayType enumeration that describes the nature of the recipient ; |6 - Display name of the recipient ; Success - one-dimensional zero based array with the following information (for $bOnlyValid = True): ; |0 - Recipient object which was successfully resolved by the Resolve method. Unresolveable recipients are not part of the result! ; | @extended holds the number of unresolved recipients. ; Failure - Returns "" and sets @error: ; |1 - $oOL is not an object ; |2 - $vP1 is empty or the first element of the array passed with $vP1 is empty ; |3 - Error creating recipient object. @extended contains the error returned by method CreateRecipient ; Author ........: water ; Modified ......: ; Remarks .......: When $bOnlyValid = True you get a one-dimensional zero based array with all invalid recipients removed. ; This array can easily be passed to _OL_ItemRecipientAdd. ; @extended holds the number of unresolved recipients. ; | ; Outlook compares the recipient from left to right with the address book. This means Outlook might find more than one recipient even when they ; are different e.g."John Doe" could be resolved to "John Doe" and "John Doerler". ; When $bStrict = True then the recipient is prependet with "=" so a strict comparison is used e.g. "=John Doe". ; Related .......: ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func _OL_ItemRecipientCheck($oOL, $vP1, $sP2 = "", $sP3 = "", $sP4 = "", $sP5 = "", $sP6 = "", $sP7 = "", $sP8 = "", $sP9 = "", $vP10 = "", $bOnlyValid = False, $bStrict = True) If $bOnlyValid = Default Then $bOnlyValid = False If $bStrict = Default Then $bStrict = True Local $oRecipient, $asRecipients[10], $iIndex2, $iUnresolved = 0 If Not IsObj($oOL) Then Return SetError(1, 0, "") ; Move recipients into an array If Not IsArray($vP1) Then If StringInStr($vP1, ";") > 0 Then $asRecipients = StringSplit($vP1, ";", 2) Else $asRecipients[0] = $vP1 $asRecipients[1] = $sP2 $asRecipients[2] = $sP3 $asRecipients[3] = $sP4 $asRecipients[4] = $sP5 $asRecipients[5] = $sP6 $asRecipients[6] = $sP7 $asRecipients[7] = $sP8 $asRecipients[8] = $sP9 $asRecipients[9] = $vP10 EndIf Else $asRecipients = $vP1 EndIf If StringStripWS($asRecipients[0], 3) = "" Then Return SetError(2, 0, "") ; <== Moved this line If $bOnlyValid Then Local $asResult[UBound($asRecipients, 1)] $iIndex2 = 0 Else Local $asResult[UBound($asRecipients, 1) + 1][7] ; = [[UBound($asRecipients, 1), 7]] $iIndex2 = 1 EndIf For $iIndex = 0 To UBound($asRecipients, 1) - 1 If StringStripWS($asRecipients[$iIndex], 3) = "" Or $asRecipients[$iIndex] = Default Then ContinueLoop If Not $bOnlyValid Then $asResult[$iIndex2][0] = $asRecipients[$iIndex] If $bStrict And StringLeft($asRecipients[$iIndex], 1) <> "=" Then $oRecipient = $oOL.Session.CreateRecipient("=" & $asRecipients[$iIndex]) Else $oRecipient = $oOL.Session.CreateRecipient($asRecipients[$iIndex]) EndIf If @error Or Not IsObj($oRecipient) Then Return SetError(3, @error, "") $oRecipient.Resolve If @error Or Not $oRecipient.Resolved Then If $bOnlyValid Then $iUnresolved = $iUnresolved + 1 ; Count unresolved recipients ContinueLoop EndIf $asResult[$iIndex2][1] = False Else If $bOnlyValid Then $asResult[$iIndex2] = $oRecipient Else $asResult[$iIndex2][1] = True $asResult[$iIndex2][2] = $oRecipient Switch $oRecipient.AddressEntry.AddressEntryUserType ; Exchange user that belongs to the same or a different Exchange forest Case $olExchangeUserAddressEntry, $olExchangeRemoteUserAddressEntry $asResult[$iIndex2][3] = $oRecipient.AddressEntry.GetExchangeUser $asResult[$iIndex2][4] = $oRecipient.AddressEntry.GetExchangeUser.PrimarySmtpAddress ; Address entry in an Outlook Contacts folder Case $olOutlookContactAddressEntry $asResult[$iIndex2][3] = $oRecipient.AddressEntry.GetContact $asResult[$iIndex2][4] = $oRecipient.AddressEntry.GetContact.Email1Address ; Address entry in an Exchange Distribution list Case $olExchangeDistributionListAddressEntry $asResult[$iIndex2][3] = $oRecipient.AddressEntry.GetExchangeDistributionList ; Address entry in an an Outlook distribution list Case $olOutlookDistributionListAddressEntry $asResult[$iIndex2][3] = $oRecipient.AddressEntry Case Else EndSwitch $asResult[$iIndex2][5] = $oRecipient.DisplayType $asResult[$iIndex2][6] = $oRecipient.Name If StringLeft($asResult[$iIndex2][6], 1) = "=" Then $asResult[$iIndex2][6] = StringMid($asResult[$iIndex2][6], 2) EndIf EndIf $iIndex2 = $iIndex2 + 1 Next If $bOnlyValid Then ReDim $asResult[$iIndex2] Else ReDim $asResult[$iIndex2][7] $asResult[0][0] = $iIndex2 - 1 $asResult[0][1] = 7 EndIf Return SetError(0, $iUnresolved, $asResult) EndFunc ;==>_OL_ItemRecipientCheck
    1 point
  5. Xandy

    MapIt Quest

    MapIt Overview: Avoid posts that aren't about MapIt development. If you want to tell me good job or something try to use the Like buttons. If you have a question about MapIt I'd love to hear it. Criticism is okay with me too. Feel free to PM me about MapIt. Merging all these topics to this topic: Overview. End goal is to have a tile engine with sprites that is both a game and a world editor. Automate replacing tiles in world, or colors in tiles. Save / load worlds and tile images. Use lists of tiles for automations. Choose transparent color. MapIt is a tool to reverse map images into world file and tile images. Supported image files: bmp, jpeg, gif, your mum, png, tiff, tga When the Start and End areas are all zero; the entire image is parsed into tiles. Here is an image of the resulting world file 000.txt: Tile images are saved too: Tiles.zip. This is posted in collaborations b/c I want help. I want help bad enough that I could be willing to pay people for their time. There are plenty of jobs available, the best way to start is to get to know the project. There are at least 2 ways to do that, as a user and as a developer. I wouldn't be paying much and I'd have to see your work as valuable. I suppose a sliding scale. I'm not unreasonable and I like lots of silly things.
    1 point
  6. Ok, I think to have solved it. This is what I found: ; #FUNCTION# ==================================================================================================================== ; Name...........: _ExcelBookOpen ; Description ...: Opens an existing workbook and returns its object identifier. ; #FUNCTION# ==================================================================================================================== ; Name...........: _ExcelBookAttach ; Description ...: Attach to the first existing instance of Microsoft Excel where the search string matches based on the selected mode. ; Return values .: Success - Returns an object variable pointing to the Excel.Application, workbook object So my code becomes: #Include <Excel.au3> $oExcel = _ExcelBookAttach("C:\test.xls") $sCell = $oExcel.Application.ActiveCell.Row It was really simple...... and now possible!! Thanks to JLogan for the idea!!! Bye,
    1 point
  7. A two-dimensional array would look like this in AutoIt: Dim $aMyArray[4][4] = [[0, 111111, 468316, 20], [0, 111112, 902813, 20], [0, 111113, 950454, 20], [0, 111114, 769347, 20]] MsgBox(4096, "Array Result", $aMyArray[0][0] & ", " & $aMyArray[0][1] & ", " & $aMyArray[0][2] & ", " & $aMyArray[0][3]) Edit: Looks like @UEZ beat me to it.
    1 point
×
×
  • Create New...