
BodoWitcha
Members-
Posts
13 -
Joined
-
Last visited
Everything posted by BodoWitcha
-
Tidy error message line numbers are off by 1
BodoWitcha replied to BodoWitcha's topic in AutoIt Technical Discussion
Melba23,Thanks for you clarifications. -
Tidy error message line numbers are off by 1
BodoWitcha replied to BodoWitcha's topic in AutoIt Technical Discussion
I fully agree. But tidy tells the first error msg is on line 9, while that error message is on line 8. The first issue is, as you said earlier, which must be fixed (in this case on line 6 the extra Else). The sample was created to create tidy errors to report the issue. Fixing the code is not the issue, but referring to the wrong line is. -
To illustrate the issue I have created a small script file (The line numbers are added for display purposes) 1 For $ix = 1 To 10 Step 1 2 If $ix = 5 Then 3 ConsoleWrite("five" & @CRLF) 4 Else 5 ConsoleWrite($ix & @CRLF) 6 Else 7 EndIf 8 ;### Tidy Error: "endselect" is likely missing it's opening statement. next line creates a negative tablevel. 9 ;### Tidy Error -> "endselect" is closing previous "for" on line 1 10 EndSelect 11 ;### Tidy Error: "next" is likely missing it's opening statement. next line creates a negative tablevel. 12 Next The error messages displayed after Ctrl+T are: >"C:\Program Files (x86)\AutoIt3\SciTE\tidy\tidy.exe" "D:\Projecten\AutoIt_Debugger\Test\_experiment.au3" Tidy AutoIt3 v15.725.1310.0 Copyright (c) Jos van der Zande July 25,2015 "D:\Projecten\AutoIt_Debugger\Test\_experiment.au3"(9) : ### Tidy Error: "endselect" is likely missing it's opening statement. next line creates a negative tablevel. "D:\Projecten\AutoIt_Debugger\Test\_experiment.au3"(10) : ### Tidy Error -> "endselect" is closing previous "for" on line 1 "D:\Projecten\AutoIt_Debugger\Test\_experiment.au3"(12) : ### Tidy Error: "next" is likely missing it's opening statement. next line creates a negative tablevel. !> there were 3 error(s) encountered. look in your source for:### Tidy Error: +> Tidy AutoIt3 finished and has no updates to make! >Exit code: 3 Time: 0.4565The errors are on lines 8,9 and 11 and not the reported 9,10 and 12.
-
Thanks for your feedback. We understand better what the problem is now and please continue to work with 0.44.2 for the time being until we have fixed the problem you have reported. It was exactly in that area where some changes were made, which created a problem with relative addressing of include files. This is planned to be fixed in the next version. You was not alone, but most users do not have an extra relative folder in their include path.
-
The Tidy utility is a function to change the look of the script code. When you are editing the script code use Ctrl+T and look what happens. The logic will not change, but the code will be indented based on the structure of the script code, because it looks to e.g the If Then Else EndIf and the For Next words. It also changes all keywords to the suggested Capitalization, For instead of for, etc. Version 0.45.0 contains some changes, which solve the problem reported by others, which looks similar to your symptoms. BodoWitcha
-
Hi ALandor,Based on the problems of Saitoh183 I suggest as circumvention to execute the Tidy function (Ctrl-T in the SciTE editor or the toolbutton in the debugger). It capitalize all AutoIt script statements to its default form. (your orignal script will be saved in the Backup folder with e.g. your scriptname_old35.au3) This suggestion is to avoid a similar problem as reported by Saitoh183. In case the problem persists, we like to have a little bit more data, so we can try to reproduce your reported problem. BodoWitcha
-
if you start the debugger and the the option under IDE settings "Enable automatic checking for updates" is enabled, you are prompted for the latest download. This is of course a circumvention, but for those who want to use it, maybe a solution. Edit: The problem with the website is fixed.
-
RegEnumVal en RegEnumKey unexpected results
BodoWitcha replied to BodoWitcha's topic in AutoIt General Help and Support
Absolutely right. Thanks. -
RegEnumVal en RegEnumKey unexpected results
BodoWitcha replied to BodoWitcha's topic in AutoIt General Help and Support
I found the bug. It is my brain. I shuffeld too much with key field and values. Thanks for the quick reaction. -
RegEnumVal en RegEnumKey unexpected results
BodoWitcha replied to BodoWitcha's topic in AutoIt General Help and Support
I expected to see instead of CLASSPATH e.g. .;C:\Program Files\Java\jre1.6.0_03\lib\ext\QTJava.zip -
When I try to use the Functions RegEnumKey and RegEnumVal I get unexpected results: I have made this sample code: ConsoleWrite('RegEnumVal' & @LF) ; For $i = 1 To 3 $var = RegEnumVal("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\", $i) If @error <> 0 Then ConsoleWrite("@error: " & @error & @LF) ExitLoop EndIf ConsoleWrite("SubVal #" & $i & " under HKLM\CurrentControlSet\Control\Session Manager\Environment: " & $var & @LF) Next ; ConsoleWrite('RegEnumKey' & @LF) ; For $i = 1 To 3 $var = RegEnumKey("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\", $i) If @error <> 0 Then ConsoleWrite("@error: " & @error & @LF) ExitLoop EndIf ConsoleWrite("SubKey #" & $i & " under HKLM\CurrentControlSet\Control\Session Manager\Environment: " & $var & @LF) Nextand I get the following results: Watch the version (3.2.12.0) >Running:(3.2.12.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Program Files\ComicHtmlMenuBuilderDevelopment\remove before shipping\tst.au3" RegEnumVal SubVal #1 under HKLM\CurrentControlSet\Control\Session Manager\Environment: CLASSPATH SubVal #2 under HKLM\CurrentControlSet\Control\Session Manager\Environment: ComSpec SubVal #3 under HKLM\CurrentControlSet\Control\Session Manager\Environment: FP_NO_HOST_CHECK RegEnumKey @error: -1 Please help me out As far I can see from RegEnumVal I get keys and from RegEnumKey I get an error
-
Special character handling unclear
BodoWitcha replied to BodoWitcha's topic in AutoIt General Help and Support
Many thanks,This solves the problem for now. I have to learn another environment at the moment that the need for Unicode support arises. Bodo -
I am busy with understanding AutoIt and to do that I make small programs to look of expections are in accordance with test result. I have written a small piece, which I have used in the debugger to follow the results and pasted back the results as comment #include <String.au3> Global $test, $hex, $result1, $result2 $hex="808182838485868788898A8B8C8D8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAABACADAEAF" $test=_HexToString($hex) & "Normal text" ; ¡¢£¤¥¦§¨©ª«¬®¯Normal text $result1 = StringRegExpReplace($test,"[\000-\377]","?") ;???????????????????????????????? $result2 = StringRegExpReplace($test,"[\200-\377]","?") ;?????????????????????Normal text ; MsgBox(0,"",$test & @CRLF & $result1 & @CRLF & $result2) The proggie creates some chars with codes of ox80 and higher. I use the StringRegExpReplace with the patterns [\000-\377] and [\200-\377] to replace matches with ? (question marks). I expected to see in $result1 only ???????????? and in in result 2 all ????? followed by Normal text Is my interpretation wrong?