Custom Query (3910 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (361 - 363 of 3910)

Ticket Resolution Summary Owner Reporter
#2366 Fixed For loop not working as expected Jon BrewManNH
Description

Here's some code I came across that isn't working as it should, at least isn't working as I think it should work.

Global $Array[5] = ["AA", "BB", "CC", "DD", "EE"]
For $I = -1 To $Array
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $I = ' & $I & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
Next
Global $Array[5][2] = [["AA", "1"], ["BB", 2], ["CC", 3], ["DD", 4],["EE", 5]]
For $I = 10 To $Array
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $I = ' & $I & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
Next

The output from the code above, when run from SciTE, is this.

@@ Debug(7) : $I = -1 Error code: 0 @@ Debug(7) : $I = BB Error code: 0 @@ Debug(7) : $I = CC Error code: 0 @@ Debug(7) : $I = DD Error code: 0 @@ Debug(7) : $I = EE Error code: 0 @@ Debug(11) : $I = 10 Error code: 0 @@ Debug(11) : $I = 10 Error code: 0 @@ Debug(11) : $I = 10 Error code: 0 @@ Debug(11) : $I = 10 Error code: 0 @@ Debug(11) : $I = 10

The first value of $I is correct, it starts at whatever the For loop starts at, but then the For/Next loop starts acting like a For/In/Next loop. On a 2D array, the second section of code, it just loops for however many elements there are in the array, and the initial value of $I doesn't change. I would have expected this to either error out, because it's referencing an array instead of a number, or run once because there's no end number to reach. I have tested this code on 3.3.8.1, 3.3.6.1, and 3.3.9.5, 3.3.9.11 and they all run the same way. I don't think this should be working the way it is and appears to be a bug.

Reopening this as the bug still exists, see previous bug report ticket

#2367 Fixed beta regression on retrieving twice same $oIE.document Jon J-Paul Mesnage
Description

The repro script is returning now 1 instead of 0

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt("TrayIconDebug", 1)

Global $ret = 0
; Create two WebBrowser controls to embed
Global $oIE = ObjCreate("Shell.Explorer.2")
Global $oIE2 = ObjCreate("Shell.Explorer.2")

; Setup the parent GUI and embed the controls
GUICreate("Embedded Web control Test", 1200, 700, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_CLIPCHILDREN))
GUICtrlCreateObj($oIE2, 580, 1, 570, 660)
GUICtrlCreateObj($oIE, 1, 1, 570, 660)

GUISetState() ;Show GUI

; Update first control
$oIE.navigate("http://www.google.fr")
; Wait for document object to be created
While Not IsObj($oIE.document)
	Sleep(100)
WEnd
; Wait for document load to complete
While $oIE.document.readyState <> "complete"
	Sleep(100)
WEnd

; Update second control
$oIE2.navigate("http://www.google.fr")
; Wait for document object to be created
While Not IsObj($oIE2.document)
	Sleep(100)
WEnd
; Wait for document load to complete
While $oIE2.document.readyState <> "complete"
	Sleep(100)
WEnd

Global $oDocRef1 = $oIE.document
Global $oDocRef2 = $oIE.document
Global $oDocCopy1 = $oDocRef1
Global $oIE3 = $oIE

If $oDocRef1 <> $oDocRef2 Then $ret = 1 ; Regression with beta ====================================
If $oDocRef1 <> $oDocCopy1 Then $ret = BitOR($ret, 2)
If $oIE = $oIE2 Then $ret = BitOR($ret, 4)
If $oIE <> $oIE3 Then $ret = BitOR($ret, 8)

; Only = and <> are implemented, all others should return False
If $oIE < $oIE2 Then $ret = BitOR($ret, 16)
If $oIE > $oIE2 Then $ret = BitOR($ret, 32)
If $oIE == $oIE2 Then $ret = BitOR($ret, 64)
If $oIE = 423 Then $ret = BitOR($ret, 128)
If $oIE = "Test" Then $ret = BitOR($ret, 256)
If $oIE == "Test" Then $ret = BitOR($ret, 512)

Exit $ret

#2372 Fixed Function incorrect number of parameters error on wrong line Jon Matt Diesel
Description

It is reporting the location of where another function was defined, rather than the line that the error occurred.

For example, the error below is that I am calling HotkeySet with 3 arguments, when it should only have 2.

Func UDF_Function($a, $b)
EndFunc

HotkeySet(UDF_Function(1, 2), "", "")

The output is:

v3.3.9.13:

"test.au3" (1) : ==> Incorrect number of parameters in function call.:
Func UDF_Function($a, $b)
^ ERROR
->10:29:37 AutoIt3.exe ended.rc:1

v3.3.8.1:

test.au3 (1) : ==> Incorrect number of parameters in function call.:
HotkeySet(UDF_Function(1, 2), "", "")
^ ERROR
->10:35:19 AutoIt3.exe ended.rc:1
Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.