Custom Query (3920 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (349 - 351 of 3920)

Ticket Resolution Summary Owner Reporter
#3634 Rejected _FileListToArray error codes tatane
Description

Hi,

I'm using _FileListToArray function and I'm getting error code 4 when I don't have enough right access to the folder I want to list.

I modified this function to my need by adding "If _WinAPI_GetLastError() = 5 Then SetError(5, 0, 0)" in the code.

It's not essential but could the dev consider adding this error return ?

Thanks for your work.

#3633 Fixed _GUICtrlRichEdit_FindText does not flag failure to find CR Jpm davidjudysmith@…
Description

There seems to be a problem with _GUICtrlRichEdit_FindText, or at least a problem with its documentation.

The attached script FindTextTest.au3 illustrates the problem. The script creates a Rich Edit control and fills it with three lines, one of which is blank; each line is followed by a CR. The For loop sets the character position, initially at the beginning of the text, then searches for the next CR character. Results of these searches are reported in a MsgBox when the loop completes.

According to the documentation, _GUICtrlRichEdit_FindText should return "the inter-character position before start of matching text if found, else -1." But my test program never gets a -1 from that function, even when it is obviously searching beyond the end of the text.

The third pass through the For loop correctly returns the position of the last CR. The fourth pass should return a -1 status or a code in @error, because there are no more CR characters, but it does not. In the last two passes, the FindText function returns a value that is one less than the starting position, apparently because the starting position is beyond the end of the text, but that behavior is not documented. (Note that GotoCharPos does not fail.) The error only comes from GetTextInRange, because End<Start.

I suggest one or more of the following:

  • Return a failure from GotoCharPos if the position is beyond the end of the text;
  • Correctly handle searches for CR characters, which seem to be different from printable characters;
  • Provide a different way to search for CR characters (actual end of a line/paragraph, not just end of displayed line);
  • Document that FindText returns the position of the end of the text, if it is started beyond that point, or generate an error in that case.

Note also that _GUICtrlRichEdit_GetTextLength returns a number that's larger (25 vs 22) than the actual number of characters. That makes it useless for a comparison with character positions.

#3632 Fixed The second parameter for _Net_Share_ShareCheck is incorrectly documented and inconsistent with related functions Jpm Bob Anthony
Description

Per the documentation, the second parameter for _Net_Share_ShareCheck is a share name. This would be consistent with the related functions; ShareAdd, ShareDel, ShareGetInfo. However, when given a share name the function returns -1 with extended 2311. The example script in the help file for this function fails when you comment the ShareDel line and run the script a second time.

I found that this function requires the share path to functions as expected. The code below shows that when given a share name the function returns -1. Swapping lines 6 and 7 shows that it functions as expected when passed the local path gathered from ShareGetInfo.

#include <NetShare.au3>

$sComputerName = @ComputerName
$aInfo = _Net_Share_ShareEnum($sComputerName)
For $iI = 1 To $aInfo[0][0]
	;If CheckShareByName($sComputerName, $aInfo[$iI][0]) = -1 Then
	If _Net_Share_ShareCheck ($sComputerName, $aInfo[$iI][0]) = -1 Then
		ConsoleWrite("Share " & $aInfo[$iI][0] & " does not exist" & @CRLF)
	Else
		ConsoleWrite("Share Name: " & $aInfo[$iI][0] & @CRLF)
		ConsoleWrite("Share Type: " & _Net_Share_ResourceStr($aInfo[$iI][1]) & @CRLF)
		ConsoleWrite("Share Path: " & $aInfo[$iI][6] & @CRLF & @CRLF)
	EndIf
Next

Func CheckShareByName($sServer, $sShareName)
	Local $aReturn = _Net_Share_ShareGetInfo($sServer, $sShareName)
	If @error Then Return SetError(@error, 0, -1)
	Return _Net_Share_ShareCheck($sServer, $aReturn[6])
EndFunc
Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.