#region - AutoitInfo.au3 ;=============================================================================== ; UDF Name: AutoitInfo.au3 ; ; Version v1.0.0 December 11, 2007, built with Autoit Beta 3.2.9.14 ; ; Author: Valuater, Robert M ; ; Contributions: .... your name here! ; ; Email: ; ; Use: Display Autoit Array/Error/Success Returns in numerous styles ;=============================================================================== #include-once ;=============================================================================== ; ; Function Name: _AutoitInfoDisplay() ; Description: Display most all Autoit Returns ; Get Autoit descriptions by command name ; Display over 5 ways / or return string or array ; Get Last Error from Windows ; Parameter(s): $aiReturn [default] "Last" = Get Last Error from Windows ; [optional] Almost any return from any autoit command ; Almost any array 1 or 2 dimansional ; Any string with Autoits default "|" delimiter ; Any Autoit numerical error or success return ; $aiCommand [default] 0 - "Autoit Info Display" ; [preferred] Almost any Autoit command name for information reference ; *Note* not all Autoit commands have info returns ; $aiDisplay [Default] 0 = Console Write ; [Optional] 1 = On-Top Message Box ; 2 = ToolTip at top left corner of screen ; 3 = Ballon TrayTip ; 4 = Paste to Clipboard ; 5 = Return an Array ; 6 = Return a String delimited by "|" (Autoits default) ; Requirement(s): Latest Beta Ver 3.2.9.14+ ; No Includes, No Globalized Variables ; Return Value(s): ; On Success Return = 1 ( mostly - see return list at bottom of UDF ) ; ; On Error: Return = "" Display a Description of the error ; ; Author(s): Valuater, Robert M ; ;=============================================================================== _AutoitInfoDisplay("Version") ; checks AID version and Autoit Beta version Func _AutoitInfoDisplay($aiReturn = "Last", $aiCommand = 0, $aiDisplay = 0) Local $aRet = "", $aList = "", $sList = "", $2D, $aNum, $aLen, $aStart, $aiVer = "1.0.1" ; Beta Ver 3.2.9.14 Local $2D, $aSpace = ".", $aDivider = ".: ", $aCRLF = " " & @CRLF, $aSpliter = "|" ; this spliter is used by Autoit If $aiReturn == -1 Then $aiReturn = 0 ; end-of-file If $aiCommand == 0 Then $aiCommand = "Autoit Info Display" If IsString($aiReturn) And StringInStr($aiReturn, $aSpliter) Then $aiReturn = StringSplit($aiReturn, $aSpliter) If $aiReturn == "Version" Then $aiReturn = "--> Autoit Info Ver = " & $aiVer & @CRLF & "--> Autoit/Beta Ver = " & @AutoItVersion If UBound($aiReturn, 0) >= 3 Then $aiReturn = "AID Error = $aiReturn is Not intended for 3+ dimensional arrays." & $aCRLF ; Success arrays or regular arrays - 2 dimensional If UBound($aiReturn, 0) = 2 Then ;2 dimensions = WinList, IniReadSection, _WinAPI_EnumWindows, _WinAPI_EnumWindowsPopup, _WinAPI_EnumWindowsTop, etc If $aiCommand <> "Autoit Info Display" Then Switch $aiCommand Case "_GDIPlus_Decoders", "_GDIPlus_Encoders" $aList = "Number of decoders,Codec identifier,File format identifier,Codec name,Dll in which the code resides,The name of the file format used by the codec,Filename extensions associated with the codec,The mime type of the codec," & _ "Combination of $GDIP_ICF flags,The version of the codec,The number of signatures used by the file format,The number of bytes in each signature,Pointer to the pattern for each signature,Pointer to the mask for each signature" EndSwitch EndIf If $aList <> "" Then ; $aiCommand was found. $aList = StringSplit($aList, ",") If UBound($aiReturn, 2) > $aList[0] Then $aRet = "AID Error = $aiReturn (" & UBound($aiReturn, 2) & ") is larger than Autoit command return information list (" & $aList[0] & "). " & $aCRLF If $aRet = "" Then ; check for error above $aLen = StringLen($aList[0]) ; find longest string For $aNum = 0 To $aList[0] - 1 If StringLen($aList[$aNum + 1]) > $aLen Then $aLen = StringLen($aList[$aNum + 1]) Next For $aNum = 0 To $aList[0] - 1 ; make all strings same length (try to anyways) $aStart = $aLen - StringLen($aList[$aNum + 1]) For $aX = 1 To $aStart $aList[$aNum + 1] = $aList[$aNum + 1] & $aSpace Next Next For $aNum = 0 To UBound($aiReturn, 1) - 1 ; add the info to the return For $2D = 0 To UBound($aiReturn, 2) - 1 $aRet = $aRet & $aList[$2D + 1] & $aDivider & $aiReturn[$aNum][$2D] & $aCRLF Next Next EndIf EndIf ; Just display the array If $aRet = "" Then For $aNum = 0 To UBound($aiReturn) - 1 For $2D = 0 To UBound($aiReturn, 2) - 1 $aRet = $aRet & $aiReturn[$aNum][$2D] & $aCRLF Next ;$aRet = $aRet & @CRLF ; add a line space between 1st level dimensions Next EndIf ; Success arrays or regular arrays - 1 dimensional ElseIf UBound($aiReturn, 0) = 1 Then If $aiCommand <> "Autoit Info Display" Then Switch $aiCommand Case "_IE_VersionInfo" $aList = "Release Type,Major Version,Minor Version,Sub Version,Release Date,Display Version" ; 0 Based Case "_Word_VersionInfo" $aList = "Release Type,Major Version,Minor Version,Sub Version,Release Date,Display Version" ; 0 Based Case "DirGetSize" $aList = "Directory size,File count,Directory count" ; 0 Based Case "FileGetShortcut" $aList = "Shortcut target path,Working directory,Arguments,Description,Icon filename,Icon index,The shortcut state" ; 0 Based Case "_PathSplit" $aList = "original path,Drive,Directory,Filename,Extention" ; 0 Based Case "FileGetTime" $aList = "Year,Month,Day,Hour,Minutes,Seconds" ; 0 Based Case "_GUICtrlDTP_GetRange" $aList = "Min data valid,Min Year,Min Month,Min Day,Min Hour,Min Minute,Min Second,Max data valid,Max Year,Max Month,Max Day,Max Hour,Max Minute,Max Second" ; 0 Based Case "_GUICtrlDTP_GetSystemTime" $aList = "Year,Month,Day,Hour,Minute,Second" ; 0 Based Case "GUIGetMsg" ; GUIGetMsg(1) $aList = "Event/Control ID,Window handle,Mouse X position,Mouse Y position" ; 0 Based Case "UDPBind", "UDPOpen" $aList = "'',Real Socket,IP address,Port" ; 1 Based Case "ProcessGetStats" $aList = "WorkingSetSize,PeakWorkingSetSize" ; 0 Based If UBound($aiReturn) > 3 Then $aList = "# Read operations,# Right operations,# I/O operations,# Bytes read,# Bytes written,# Bytes transferred" ; 0 Based Case "ControlGetPos", "_GUICtrlEdit_PosFromChar", "_GUICtrlListView_GetItemPosition", "_GUICtrlListView_GetItemSpacing", "_GUICtrlListView_GetOrigin", "WinGetPos" $aList = "X position,Y position,Width,Height" ; 0 Based Case "_WinAPI_GetIconInfo" $aList = "Success or Fail,True Icon or False Cursor,X position,Y position,Icon Bitmask,Icon color bitmap" ; 0 Based Case "GUIGetCursorInfo", "_GuiCtrlListView_SetIconSpacing", "MouseGetPos", "PixelSearch", "WinGetCaretPos" $aList = "X coordinate,Y coordinate,Primary down,Secondary down,Hover control ID" ; 0 Based Case "_ChooseFont" $aList = "Elements,Attributes,Font name,Font size,Font wieght,ColorREF RGB,Hex BGR Color,Hex RGB Color" ; 0 Based Case "_Date_Time_DOSTimeToArray" $aList = "Hour,Minute,Second" ; 0 Based Case "_Date_Time_FileTimeToArray", "_Date_Time_DOSDateToArray", "_Date_Time_DOSDateTimeToArray", "_Date_Time_SystemTimeToArray" $aList = "Month,Day,Year,Hour,Minutes,Seconds,Milliseconds,Day of week" ; 0 Based Case "_Date_Time_GetFileTime" $aList = "$tagFILETIME created,$tagFILETIME accessed,$tagFILETIME modified" ; 0 Based Case "_Date_Time_GetSystemTimeAdjustment" $aList = "# of 100 nanosecond units added,# of 100 nanosecond units between,True indicates that periodic time adjustment is disabled" ; 0 Based Case "_Date_Time_GetSystemTimes" $aList = "$tagFILETIME total system idle time,$tagFILETIME total system kernel mode time,$tagFILETIME total system user mode time" ; 0 Based Case "_Date_Time_GetTimeZoneInformation" $aList = "Result,Current bias,Standard NAME,Standard date/time,Standard bias,Daylight name,Daylight date/time,Daylight bias" ; 0 Based Case "_EventLog__Read" $aList = "True = success - False = failure,Number of the record,Date entry was submitted,Time entry was submitted,Date entry was written to the log,Time entry was written to the log," & _ "Event identifier,Event type. (See Help),Event type string,Event category,Event source,Computer name,Username,Event description,Event data array" ; 0 Based Case "_GDIPlus_GraphicsMeasureString" $aList = "$tagGDIPRECTF structure that receives the rectangle that bounds the string,The number of characters that actually fit into the layout rectangle,The number of lines that fit into the layout rectangle" ; 0 Based Case "_GUICtrlComboBox_GetDroppedControlRect", "_GUICtrlEdit_GetRECT", "_GUICtrlHeader_GetItemRect", "_GUICtrlListBox_GetItemRect", "_GUICtrlListView_GetItemRect", "_GUICtrlListView_GetSubItemRect", "_GUICtrlListView_GetViewRect", "_GUICtrlMenu_GetItemRect", "_GUICtrlRebar_GetBandBorders", "_GUICtrlRebar_GetBandRect" $aList = "X coordinate of the upper left corner of the rectangle,Y coordinate of the upper left corner of the rectangle,X coordinate of the lower right corner of the rectangle,Y coordinate of the lower right corner of the rectangle" ; 0 Based Case "_GUICtrlSlider_GetChannelRect", "_GUICtrlSlider_GetThumbRect", "_GUICtrlStatusBar_GetRect", "_GUICtrlTab_GetDisplayRect", "_GUICtrlTab_GetItemRect", "_GUICtrlToolbar_GetButtonRect", "_GUICtrlToolbar_SetRows", "_GUICtrlTreeView_DisplayRect" $aList = "X coordinate of the upper left corner of the rectangle,Y coordinate of the upper left corner of the rectangle,X coordinate of the lower right corner of the rectangle,Y coordinate of the lower right corner of the rectangle" ; 0 Based Case "_GUICtrlComboBox_SetEditSel", "_GUICtrlEdit_SetSel" $aList = "Starting position,Ending position" ; 0 Based Case "_GUICtrlComboBoxEx_GetItem" $aList = "Item text,Length of Item text,Number of image widths to indent the item,Zero based item image index,Zero based item state image index,Zero based item image overlay index,Item application defined value" ; 0 Based Case "_GUICtrlEdit_CharFromPos" $aList = "Zero-based index of the character nearest the specified point,Zero-based index of the line that contains the character" ; 0 Based Case "_GUICtrlEdit_GetMargins" $aList = "The width of the left margin,The width of the right margin" ; 0 Based Case "_GUICtrlHeader_HitTest" $aList = "Item index,In client window,In control rectangle,On divider,On zero width divider,Over filter area,Over filter button,Above bounding rectangle,Below bounding rectangle,To right of bounding rectangle,To left of bounding rectangle" ; 0 Based Case "_GUICtrlListView_ApproximateViewRect" $aList = "Approximate width (in pixels) needed to display the items.,Approximate height (in pixels) needed to display the items." ; 0 Based Case "_GUICtrlListView_CreateDragImage" $aList = "Handle to the drag image list if successful (otherwise 0).,X coordinate of the upper left corner of the image.,Y coordinate of the upper left corner of the image." ; 0 Based Case "_GUICtrlListView_GetBkImage" $aList = "Flags: 1-no background 2-background from bitmap 3-background from URL,URL of the background image,Percentage client area that image should be X offset,Percentage client area that image should be Y offset" ; 0 Based Case "_GUICtrlListView_GetColumn" $aList = "Header & Column text alignment: 0-left-aligned 1-right-aligned 2-Text is centered,True if item displays an image from an image list,True if bitmap appears to the right of text,True if header contains an image,Width of the column (in pixels),Column header text,Index of subitem associated with the column,Zero-based index of an image within the image list,Zero-based column order" ; 0 Based Case "_GUICtrlListView_GetGroupInfo" $aList = "Header text,Header alignment: 0-left-aligned 1-Text is centered 2-right-aligned" ; 0 Based Case "_GUICtrlListView_GetItem" $aList = "Item state: 1-marked for cut-and-paste 2-highlighted as a drag-and-drop target 4-has focus 8-is selected,One based item image overlay index,One based item state image index,Item text,Zero based item image index,Item application defined value,Number of image widths to indent the item,Identifier of the tile view group that receives the item" ; 0 Based Case "_GUICtrlListView_HitTest" $aList = "Item index,In client window,over item icon,over item text,over item state image,somewhere on the item,above the control's client area,below the control's client area,left of the client area,right of the client area" ; 0 Based Case "_GUICtrlListView_SubItemHitTest" $aList = "Item index,Subitem index,In client window,over item icon,over item text,over item state image,somewhere on the item,above the control's client area,below the control's client area,left of the client area,right of the client area" ; 0 Based Case "_GUICtrlMenu_GetMenuBarInfo" $aList = "X coordinate of the upper left corner of the rectangle,Y coordinate of the upper left corner of the rectangle,X coordinate of the lower right corner of the rectangle,Y coordinate of the lower right corner of the rectangle,Handle to the menu bar or popup menu,Handle to the submenu,True if the menu bar has focus,True if the menu item has focus" ; 0 Based Case "_GUICtrlMonthCal_GetColorArray" $aList = "Elements,ColorREF RGB,Hex BGR Color,Hex RGB Color" ; 0 Based Case "_GUICtrlRebar_GetBandChildSize" $aList = "Minimum width of the child window (in pixels),Minimum height of the child window,Initial height of the band,Maximum height of the band,Step value the band can grow or shrink" ; 0 Based Case "_GUICtrlRebar_GetBandMargins" $aList = "Width of the left border that retains its size,Width of the right border that retains its size,Height of the top border that retains its size,Height of the bottom border that retains its size" ; 0 Based Case "_GUICtrlRebar_GetColorScheme" $aList = "The COLORREF value that represents the highlight color of the buttons,The COLORREF value that represents the shadow color of the buttons" ; 0 Based Case "_GUICtrlRebar_HitTest" $aList = "0 Based index of the band,In control's client window but not on an band,In control's client window,Over the rebar band's caption,Over the rebar band's chevron (version 5.80+),Over the rebar band's gripper" ; 0 Based Case "_GUICtrlSlider_GetRange" $aList = "Minimum position in the slider's range of minimum to maximum slider positions,Maximum position in the slider's range of minimum to maximum slider positions" ; 0 Based Case "_GUICtrlSlider_GetSel" $aList = "The starting position of the current selection range,The ending position of the current selection range" ; 0 Based Case "_GUICtrlStatusBar_GetBorders" $aList = "Width of the horizontal border,Width of the vertical border,Width of the border between rectangles" ; 0 Based Case "_GUICtrlStatusBar_GetParts" $aList = "Number of Parts,Right edge of part #1,Right edge of part #2,Right edge of part n" ; 0 Based Case "_GUICtrlTab_GetItem" $aList = "flags: $TCIS_BUTTONPRESSED - Tab control selected / $TCIS_HIGHLIGHTED - Tab control highlighted,Item Text,Zero based item image index,Application-defined data" ; 0 Based Case "_GUICtrlTab_HitTest" $aList = "0 Based index of the tab,Results; 1-Not over a tab 2-Is over a tab's icon 4-Is over a tab's text" ; 0 Based Case "_GUICtrlToolbar_GetButtonInfo" $aList = "Zero based button image index,Button state. Can be a combination (see help), Button style. Can be a combination (see help),Button width,Button parameter" ; 0 Based Case "_GUICtrlToolbar_GetButtonSize" $aList = "Button height,Button width" ; 0 Based Case "_GUICtrlToolbar_GetColorScheme" $aList = "The highlight color of the buttons,The shadow color of the buttons" ; 0 Based Case "_GUICtrlToolbar_GetInsertMark", "_GUICtrlToolbar_InsertMarkHitTest" $aList = "0 Based index of the insertion mark,insertion mark is in relation to the control: 0-To the Left 1-To the Right 2-On the background of the toolbar" ; 0 Based Case "_GUICtrlToolbar_GetMaxSize" $aList = "Maximum width,Maximum height" ; 0 Based Case "_GUICtrlToolbar_GetMetrics" $aList = "Width of the padding inside the toolbar buttons,Height of the padding inside the toolbar buttons,Width of the space between toolbar buttons,Height of the space between toolbar buttons" ; 0 Based Case "_GUICtrlToolbar_GetPadding" $aList = "Horizontal padding,Vertical padding" ; 0 Based Case "GUIGetStyle" $aList = "Style,ExStyle" ; 0 Based Case "_GUIImageList_GetIconSize" $aList = "Width (in pixels) of each image,Height (in pixels) of each image" ; 0 Based Case "_GUIToolTip_EnumTools", "_GUIToolTip_GetCurrentTool", "_GUIToolTip_GetToolInfo", "_GUIToolTip_HitTest", "_GUIToolTip_ToolToArray" $aList = "Flags that control the ToolTip display: (see help),Handle to the window that contains the tool,Identifier of the tool,X coordinate of the upper left corner of the rectangle,Y coordinate of the upper left corner of the rectangle,X coordinate of the lower right corner of the rectangle,Y coordinate of the lower right corner of the rectangle,Handle to the instance that contains the string resource,Text for the tool,Application-defined value associated with the tool" ; 0 Based Case "_GUIToolTip_GetMargin" $aList = "Distance between top border and top of text (in pixels),Distance between left border and left end of text,Distance between bottom border and bottom of text,Distance between right border and right end of text" ; 0 Based Case "MemGetStats", "_WinAPI_GlobalMemStatus" $aList = "Percent Memory Load,Total physical RAM,Available physical RAM,Total Pagefile,Available Pagefile,Total virtual,Available virtual" Case "_NamedPipes_GetNamedPipeHandleState" $aList = "True = pipe handle in nonblocking mode-otherwise blocking mode,True = pipe handle is in message-read mode - otherwise byte read mode,Number of current pipe instances,Maximum bytes collected on client computer before transmission,Maximum time (milliseconds) before a remote named pipe transfers information over network,User name string associated with client application" ; 0 Based Case "_NamedPipes_GetNamedPipeInfo" $aList = "True = handle refers to server end - otherwise client end,True = a message pipe, otherwise byte pipe,Size of the buffer for outgoing data (bytes),Size of the buffer for incoming data (bytes),Maximum number of pipe instances that can be created" ; 0 Based Case "_NamedPipes_PeekNamedPipe" $aList = "Data read from the pipe,Bytes read from the pipe,Total bytes available to be read,Bytes remaining to be read for this message" ; 0 Based Case "_Security__LookupAccountName", "_Security__LookupAccountSid" $aList = "SID String,Domain name,SID type; 1-user 2-group 3-domain 4-alias 5-known group 6-deleted account 7-invalid 8-unknown 9-computer" ; 0 Based Case "_WinAPI_EnumDisplayDevices" $aList = "True on success - otherwise False,Either the adapter device or the monitor device,Either a description of the adapter or the monitor,Device flags; 1-device is desktop 2-desktop on device 4-For remoting 8-device is VGA 16-device is removable 32-device display modes greater / output devices support,Plug and Play identifier string (Windows 98/ME)" ; 0 Based Case "_WinAPI_GetCursorInfo" $aList = "True on success - otherwise False,True if cursor is showing - otherwise False,Handle to the cursor,X coordinate of the cursor,Y coordinate of the cursor" ; 0 Based Case "_WinAPI_GetIconInfo" $aList = "True on success - otherwise False,True specifies an icon - False specifies a cursor,X coordinate of the cursor,Y coordinate of the cursor,Specifies the icon bitmask bitmap,Handle to the icon color bitmap" ; 0 Based Case "_WinAPI_GetProcessAffinityMask" $aList = "True on success - otherwise False,Process affinity mask,System affinity mask" Case "WinGetClientSize" $aList = "Width of window's client area,Height of window's client area" ; 0 Based Case "_WinNet_GetConnectionPerformance" $aList = "Connection description; 1-performance of network card 2-connection not being routed 4-connection over medium typically slow 8-Some information returned calculated dynamically,Speed of the media to the network resource (100 bps),One-way delay time introduced when sending information,Size of data application should use when making single request to resource" ; 0 Based Case "_WinNet_GetNetworkInformation" $aList = "Version number of network provider software,Status network software; 0-network is running 1-network is unavailable 2- network not able to service requests,Instance handle for the network provider,High word of network type unique to running network,bit flags indicating valid print numbers for redirecting local printer devices - the low-order bit corresponding to LPT1,bit flags indicating valid local disk devices can be used for redirecting disk drives - the low-order bit corresponding to A" ; 0 Based Case "_WinNet_GetResourceInformation", "_WinNet_GetResourceParent" $aList = "Scope of enumeration: 0-Connected 1-All resources 2-Remembered,Type of resource: 0-Disk 1-Print 2-Unknown,Display option: 0-Generic 1-Domain 2-Server 3-Share 4-File 5-Group 6-Network 7-Root 8-Admin Share 9-Directory 10-Tree 11-NDS Container,Resource usage: 1-resource is connectable 2-resource is a container 4-resource is attached 8-resource is reserved,Local name,Remote name,Comment supplied by the network provider,The name of the provider that owns the resource,The part of the resource that is accessed through system functions" ; 0 Based Case "_WinNet_GetUniversalName" $aList = "UNC name string that identifies a network resource,Name of the network connection,Remaining path string" ; 0 Based Case "WinGetClientSize" $aList = "True = the connection was made using a local device redirection,If sLocalName specifies a local device - this is the local device name (see help)" ; 0 Based EndSwitch EndIf; End Success Array List If $aList <> "" Then ; $aiCommand was found. $aList = StringSplit($aList, ",") If UBound($aiReturn) > $aList[0] Then $aRet = "AID Error = $aiReturn (" & UBound($aiReturn) & ") is larger than Autoit command return information list (" & $aList[0] & "). " & $aCRLF If $aRet = "" Then ; check for error above $aLen = StringLen($aList[0]) ; find longest string For $aNum = 0 To $aList[0] - 1 If StringLen($aList[$aNum + 1]) > $aLen Then $aLen = StringLen($aList[$aNum + 1]) Next For $aNum = 0 To $aList[0] - 1 ; make all strings same length (try to anyways) $aStart = $aLen - StringLen($aList[$aNum + 1]) For $aX = 1 To $aStart $aList[$aNum + 1] = $aList[$aNum + 1] & $aSpace Next Next For $aNum = 0 To UBound($aiReturn) - 1 ; add the info to the return $aRet = $aRet & $aList[$aNum + 1] & $aDivider & $aiReturn[$aNum] & $aCRLF Next EndIf EndIf If $aRet = "" Then ; Just display the array, no errors and $aiCommand not found For $aNum = 0 To UBound($aiReturn) - 1 $aRet = $aRet & $aiReturn[$aNum] & $aCRLF Next EndIf ElseIf IsNumber($aiReturn) Then ; Single Line Success Returns or Single Line Error Returns (numerical) If $aiCommand <> "Autoit Info Display" Then ; Command Name required to get Autoit Info for the Return." Switch $aiCommand ; Single Line Success Returns Case "_GDIPlus_BrushGetType" $sList = "Brush type: Solid color.,Brush type: Hatch fill.,Brush type: Texture fill.,Brush type: Path gradient.,Brush type: Linear gradient." ; 0 Based Case "_GDIPlus_GraphicsGetSmoothingMode" $sList = "Smoothing is not applied.,Smoothing is applied using an 8 X 4 box filter.,Smoothing is applied using an 8 X 8 box filter." ; 0 Based Case "_GUICtrlHeader_GetItemAlign" $sList = "Success: Item text alignment: Left.,Success: Item text alignment: Right.,Success: Item text alignment: Center." ; 0 Based Case "_GUICtrlHeader_GetItemDisplay" $sList = "'',The item displays a bitmap.,The bitmap appears to the right of text.,,The control's owner draws the item.,,,,The item displays a string." ; 1 Based Case "_GUICtrlHeader_GetItemFlags" $sList = "'',Displays an image from an image list.,Text reads in the opposite direction from the text in the parent window.,,Draws a down arrow on this item.,,,,Draws a up arrow on this item." ; 1 Based Case "_GUICtrlListView_GetCallbackMask" $sList = "'',Item marked for cut-and-paste.,Item is highlighted as a drag-and-drop target.,,Item has the focus.,,,,Item is selected.,,,,,,,,The application stores the image list index of the current overlay image.,,,,,,,,,,,,,,,,The application stores the image list index of the current state image" ; 1 Based Case "_GUICtrlListView_GetView" $sList = "Detail View,Large Icon View,List View,Small Icon View,Tiled View" ; 0 Based Case "_GUICtrlMenu_GetItemState" $sList = "'',Item is checked.,Item is the default item.,,Item is disabled.,,,,Item is disabled.,,,,,,,,Item is highlighted" ; 1 Based Case "_GUICtrlMonthCal_GetFirstDOW" $sList = "Monday.,Tuesday.,Wednesday.,Thursaday.,Friday.,Saturday.,Sunday." ; 0 Based Case "_GUICtrlToolbar_GetBitmapFlags" $sList = "Use small (16 x 16) bitmaps.,Use large (24 x 24) bitmaps." ; 0 Based Case "_GUICtrlTreeView_HitTest" $sList = "'',In the client area below the last item.,On the bitmap associated with an item.,,On the text associated with an item.,,,,In the indentation associated with an item.,,,,,,,,On the button associated with an item.,,,,,,,,,,,,,,,,In the area to the right of an item" ; 1 Based If $aiReturn > 32 Then $aList = "" If $aiReturn = 64 Then $aiReturn = "On the state icon for a item that is in a user-defined state" If $aiReturn = 128 Then $aiReturn = "Above the client area" If $aiReturn = 512 Then $aiReturn = "To the left of the client area" If $aiReturn = 1024 Then $aiReturn = "To the right of the client area" Case "MsgBox" $sList = "OK,CANCEL,ABORT,RETRY,IGNORE,YES,NO,,,TRY AGAIN,CONTINUE" ; 0 Based Case "_ProcessGetPriority" $sList = "Idle/Low.,Below Normal.,Normal.,Above Normal.,High.,Realtime." ; 0 Based Case "WinGetState" $sList = "No error.,Window exists.,Window is visible.,,Window is enabled.,,,,Window is active.,,,,,,,,Window is minimized.,,,,,,,,,,,,,,,,Window is maximized" ; 0 Based ; Error Returns Case "_ArrayBinarySearch" $aList = "No error.,$avArray isn't an array.,$iKey is out of bounds.,The item wasn't found in the array." ; 0 Based Case "_ArrayAdd", "_ArrayDelete", "_ArrayDisplay", "_ArrayInsert", "_ArrayMax", "_ArrayMaxIndex", "_ArrayMin", "_ArrayMinIndex", "_ArrayPop", "_ArrayPush" $aList = "No error.,$avArray isn't an array.,$avArray has only 1 element in it." ; 0 Based Case "_ArraySearch" $aList = "No error.,$avArray isn't an array.,$iStart is greater than UBound($AvArray)-1.,$iEnd is greater than UBound($AvArray)-1.,$iStart is greater than $iEnd.,$iCaseSense was invalid. (Must be 0 or 1).,$vWhat2Find was not found in $avArray" ; 0 Based Case "_ArrayToString" $aList = "No error.,$avArray isn't an array.,$iStart or $iEnd are less than 0 or $iStart is greater than $iEnd." ; 0 Based Case "_ArrayTrim", "UBound" $aList = "No error.,$aArray isn't an array.,Invalid base boundry parameter / Dimension.,Invalid end boundry parameter.,If $iTrimDirection is not a zero or a one." ; 0 Based Case "ClipGet" $aList = "No error.,Clipboard is empty.,Clipboard contains a non-text entry.,Cannot access the clipboard.,Cannot access the clipboard." ; 0 Based Case "_ClipPutFile" $aList = "No error.,Unable to Open Clipboard.,Unable to Empty Cipboard.,GlobalAlloc Failed.,GlobalLock Failed,Unable to Create H_DROP.,Unable to Update Clipboard.,Unable to Close Clipboard.,GlobalUnlock Failed" ; 0 Based Case "_DateAdd" $aList = "No error.,Invalid $sType.,Invalid $iValToAdd.,Invalid $sDate." ; 0 Based Case "_DateDaysInMonth", "_DateIsLeapYear", "_DateDiff", "_DateTimeFormat", "_DateTimeSplit", "_DateToDayOfWeek", "_DateToDayOfWeekISO", "_DateToDayValue", "_DateToMonth", "_DateToDayValue", "_WeekNumberISO" $aList = "No error.,Invalid Input month or day or year.,Invalid $sType/$sStartDate.,Invalid $sEndDate." ; 0 Based Case "_DebugOut" $aList = "No error.,$sOutput is an incompatable type.,$bActivate is an incompatable type.,_DebugSetup() did not run properly.,The debug Notepad window has been closed. Output can not occur." ; 0 Based Case "_DebugSetup" $aList = "No error.,$sTitle is not a compatable type.,A debug session is already open. Use it instead of starting a new session.,Another Untitled MS-Notepad window is open. Save it or close it before continuing." ; 0 Based Case "DllCall" $aList = "No error.,Unable to use the DLL file.,Unknown 'return type'.,'Function' not found in the DLL file." Case "DllStructCreate" $aList = "No error.,Variable passed to DllStructCreate was not a string.,There is an unknown Data Type in the string passed.,Failed to allocate the memory needed for the struct or Pointer = 0.,Error allocating memory for the passed string." ; 0 Based Case "DllStructGetData", "DllStructGetPtr", "DllStructGetSize", "DllStructSetData" $aList = "No error.,Struct not a correct struct returned by DllStructCreate.,Element value out of range.,Index would be outside of the struct.,Element data type is unknown.,Index <= 0." ; 0 Based Case "DriveMapAdd" $aList = "No error.,Undefined error. @extended set with Windows API return.,Access to the remote share was denied., The device is already assigned.,Invalid device name.,Invalid remote share.,Invalid password." Case "_FileCreate", "_FileCountLines", "_FileReadToArray", "_FileWriteLog" $aList = "No error.,Error opening specified file.,File could not be written to." ; 0 Based Case "_FileListToArray" $aList = "No error.,Path not found or invalid.,Invalid $sFilter.,Invalid $iFlag.,No File(s) Found." ; 0 Based Case "FileRead", "FileReadLine" $aList = "'end-of-file' is reached.,File not opened in read mode or other error.,Count not defined for file open in raw read mode." ; 0 Based Case "_FileWriteFromArray" $aList = "No error.,Error opening specified file.,Input is not an Array.,Error writing to file." ; 0 Based Case "_FileWriteToLine" $aList = "No error.,File has less lines than $iLine.,File does not exist.,Error when opening file.,$iLine is invalid.,$fOverWrite is invalid.,$sText is invalid." ; 0 Based Case "_INetSmtpMail" $aList = "No error.,Invalid Parameters.,Unable to start TCP.,Unable to resolve IP.,Unable to create socket.,Cannot open SMTP session." ; 0 Based ; irregular errors include - @ERROR = 50x - Cannot send body. x indicates the line number of $as_Body (first line is 0). @ERROR = 5000 - Cannot close SMTP session Case "InputBox" $aList = "The string returned is valid.,The Cancel button was pushed.,The Timeout time was reached.,The InputBox failed to open." ; 0 Based Case "_Max", "_Min" $aList = "No error.,$nNum1 isn't a number.,$nNum2 isn't a number." ; 0 Based Case "MouseGetCursor" $aList = "UNKNOWN.,APPSTARTING.,ARROW.,CROSS.,HELP.,IBEAM.,ICON.,NO.,SIZE.,SIZEALL.,SIZENESW.,SIZENS.,SIZENWSE.,SIZEWE.,UPARROW.,WAIT." ; 0 Based Case "Ping" $aList = "No error.,Host is offline.,Host is unreachable.,Bad destination.,Other errors." ; 0 Based Case "_ProcessGetName" $aList = "No error.,Process doesn't exist.,Error getting process list.,No processes found." ; 0 Based Case "RegDelete", "RegEnumKey", "RegEnumVal", "RegRead", "RegWrite" $aList = "Unable to delete requested key/value.,Unable to open requested key.,Unable to open requested main key.,Unable to remote connect to the registry." ; 0 Based Case "_ReplaceStringInFile" $aList = "No error.,Cannot open file.,Cannot open temp file.,Cannot write to temp file.,Cannot delete original file.,Cannot rename/move temp file.,ReadOnly Attribute set." ; 0 Based Case "_SoundClose", "_SoundOpen", "_SoundLength", "_SoundPause", "SoundPlay", "SoundPos", "_SoundResume", "_SoundSeek", "_SoundStatus", "_SoundStop" $aList = "No error.,Failure / $iMode / Pause / Play / Stop.,File does not exist / $fWait parameter is invalid,Invalid Sound ID / alias contains whitespace or !." ; 0 Based Case "_SQLite_Changes", "_SQLite_Close", "_SQLite_Display2DResult", "_SQLite_Encode", "_SQLite_ErrCode", "_SQLite_ErrMsg", "_SQLite_Escape", "_SQLite_Exec", "_SQLite_LastInsertRowID", "_SQLite_Open", "_SQLite_Query", "_SQLite_QueryFinalize", "_SQLite_QueryReset", "_SQLite_SetTimeout", "_SQLite_TotalChanges" $aList = "SQLite reported an error (Check Return value).,Error calling SQLite API.,Call prevented by SaveMode.,Error processing Callback." ; 0 Based Case "_SQLite_FetchData" $aList = "SQLite reported an error (Check return value).,Error calling SQLite API 'sqlite3_step'.,Error calling SQLite API 'sqlite3_data_count'.,Error calling SQLite API 'sqlite3_column_text'.,Error calling SQLite API 'sqlite3_column_type'.,Error calling SQLite API 'sqlite3_column_bytes'.,Error calling SQLite API 'sqlite3_column_blob'.,Call prevented by SaveMode." ; 0 Based Case "_SQLite_FetchNames" $aList = "SQLite reported an error (Check return value).,Error calling SQLite API 'sqlite3_data_count'.,Error calling SQLite API 'sqlite3_column_name'.,Call prevented by SaveMode." Case "_SQLite_GetTable", "_SQLite_GetTable2d", "_SQLite_QuerySingleRow" $aList = "SQLite reported an error (Check return value).,Error calling SQLite API 'sqlite3_get_table'.,Error calling SQLite API 'sqlite3_free_table'.,Call prevented by SaveMode." Case "_SQLite_SQLiteExe" $aList = "SQLite reported an error (Check return value).,Cant create new Database.,SQLite3.exe not Found.,SQL error / incomplete SQL.,Cant open input file." Case "_StringAddComma", "_StringBetween", "_StringEncrypt", "StringInStr", "_StringRepeat", "_StringReverse", "_TicksToTime", "_TimeToTicks" $aList = "No error., String / parameters are invalid - Not found / Occurrence must be a positive or negative integer." ; 0 Based Case "_StringInsert" $aList = "No error.,Source string empty.,Insert string empty.,Invalid position." ; 0 Based Case "StringRegExp", "StringRegExpReplace" $aList = "Array is valid. Check @Extended for next offset.,Array is invalid. No matches.,Bad pattern, array is invalid. @Extended = offset of error in pattern." ; 0 Based Case "TCPConnect", "TCPListen", "UDPBind", "UDPSend" $aList = "No error.,IPAddr is incorrect.,port is incorrect." ; 0 Based Case "_TCPIpToName" $aList = "No error.,inet_addr DllCall Failed.,inet_addr Failed.,gethostbyaddr DllCall Failed.,gethostbyaddr Failed - WSAGetLastError = @Extended.,gethostbyaddr Failed - WSAGetLastError Failed.,strlen/sZStringRead Failed.,Error reading Aliases Array." ; 0 Based Case StringLeft($aiCommand, 3) = "_IE", StringLeft($aiCommand, 5) = "_word" $aList = "No Error.,General Error.,Com Error.,Invalid Data Type.,Invalid Object Type.,Invalid Value,Load Wait Timeout,No Match,Access Is Denied,Client Disconnected." ;0 Based EndSwitch EndIf ; end error/single list If $sList <> "" Then ; Success Command List found $sList = StringSplit($sList, ",") If $aiReturn > $sList[0] Then $aRet = "AID Error = $aiReturn (" & $aiReturn & ") is larger than Autoit command return information list (" & $sList[0] & "). " & $aCRLF; Success is greater than command error list. If $aRet = "" Then $aRet = " Success #" & $aiReturn & " = " & $sList[$aiReturn + 1] & $aCRLF ElseIf $aList <> "" Then ; Error Command List found $aList = StringSplit($aList, ",") If $aiReturn > $aList[0] Then $aRet = "AID Error = $aiReturn (" & $aiReturn & ") is larger than Autoit command return information list (" & $aList[0] & "). " & $aCRLF ; Error is greater than command error list. If $aRet = "" Then $aRet = " Error #" & $aiReturn & " = " & $aList[$aiReturn + 1] & $aCRLF Else ; a list was not found for $aiCommand $aRet = $aiReturn & $aCRLF ; $aRet = "AID Error = The Success/Error #" & $aiReturn & " was not found for $aiCommand *" & $aiCommand & "* . " & $aCRLF EndIf ElseIf $aiReturn == "Last" Then ; Get Last Error Local $aip = DllStructCreate("char[4096]") $aRet = DllCall("Kernel32.dll", "int", "GetLastError") $aRet = DllCall("kernel32.dll", "int", "FormatMessage", "int", 0x00001000, "ptr", 0, "int", $aRet[0], "int", 0, "ptr", DllStructGetPtr($aip), "int", 4096, "ptr", 0) $aRet = DllStructGetData($aip, 1) If @error Then $aRet = "" $aip = 0 Else $aRet = $aiReturn & $aCRLF ; $aiReturn was Un-Determinable ; Maybe.. True, False, etc. EndIf ; Display the Info If $aiDisplay = 0 Then Return ConsoleWrite($aRet) ; 0 = Console Write If $aiDisplay = 1 Then Return MsgBox(262208, $aiCommand, $aRet) ; 1 = Message Box If $aiDisplay = 2 Then Return ToolTip($aRet, 20, 20, $aiCommand, 1) ; 2 = ToolTip If $aiDisplay = 3 Then Return TrayTip($aiCommand, $aRet, 5, 1) ; 3 = TrayTip If $aiDisplay = 4 Then Return ClipPut($aRet); 4 = Clipboard If $aiDisplay = 5 Then Return StringSplit(StringTrimRight(StringReplace(StringReplace($aRet, @TAB, ""), @CRLF, $aSpliter), 1), $aSpliter); 5 = Return an Array Return StringReplace(StringReplace($aRet, @TAB, ""), @CRLF, $aSpliter) ; return the string with Autoits spliter "|" EndFunc ;==>_AutoitInfoDisplay #endregion - AutoitInfo.au3