Jump to content

New Release Question (Not Beta)


Recommended Posts

I have a question about what to do or more importantly the "whys" of what is going on.  I recently updated to the latest version of Autoit, after posting a previous different question and now have come up against an issue that was one of my concerns of upgrading.  What was working before in the previous version, does not work in the latest version. Here is a segment of what I have found. My script functions just fine in the previous version. New version gives an error for $List6 (in this case; see below), saying the statement cannot stand alone.

Your help/explanation would be appreciated. As a relatively new user, I don't get it.

Hobbyist

Original Working Script:  Used SciTE Version 3.4.1 (Mar 30 2014 21:57:28);    Autoit v3.3.10.2

 

Case $GUI_EVENT_PRIMARYUP

    If $fComboActive2 Then
     GUICtrlSetState($AEamounts, $GUI_FOCUS)
      EndIf

    If $listswitch = 5 Then
     GUICtrlSetState($idDelete, $GUI_enABLE)
    Else
     GUICtrlSetState($idDelete, $GUI_disABLE)
      EndIf

    $List6 ; Statement Download


    If GUICtrlRead($Radio1A) = 1 Then
                $nmn6 = _GUICtrlListView_GetSelectedIndices($List6)
        If $nmn6 <> "" Then
        $statementfile = $aItems200[$nmn6]
        GUICtrlSetData($Label3, $statementfile)
        EndIf
        EndIf

    If $statementfile <> "" And $budgetlogfile <> "" Then
        GUICtrlSetState($Button4, $GUI_ENABLE)
         EndIf

blah

blah
bla

 

Link to comment
Share on other sites

If you have problems with a script either post the whole script or a stripped down reproducer so we have something to play with.
Your code snippet doesn't tell us very much.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

What have been said, plus one question: what do you believe it means to have a variable name on its own in a script?

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

My point is being MISSED.

In the prior version (see snippet above) the $List6 stands alone and in front of the ; comment or has no case.  I missed that and the editor didn't flag it. Proceeded with script process, compiling went fine etc. Opening  the script in the latest version and attempting to run it produced the flag.  That flag issue is my concern.

The code worked "like that" with no errors,  BUT taking the same code into the new version, it was/is

#include <Array.au3>
#include <ButtonConstants.au3>
#include <ColorConstants.au3>
#include <ComboConstants.au3>
#include <Date.au3>
#include <EditConstants.au3>
#include <File.au3>
#include <GUIComboBox.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <GuiListView.au3>
#include <ListViewConstants.au3>
#include <Misc.au3>
#include <MsgBoxConstants.au3>
#include <StaticConstants.au3>
#include <String.au3>
#include <WindowsConstants.au3>
#include <StringConstants.au3>
#include <FileConstants.au3>
#include <GuiTab.au3>
#include <GuiButton.au3>
#include <GuiMenu.au3>
#include <WinAPI.au3>
#include <Constants.au3>
#include <WinAPIFiles.au3>
#include <GuiDateTimePicker.au3>
#include <Sound.au3>


$main = GUICreate(" Board", 680, 515, 150, 100)


$List6 = GUICtrlCreateListView("", 192, 72, 470, 260, $LVS_SINGLESEL, $LVS_EX_GRIDLINES + $LVS_EX_FULLROWSELECT) ;All Downloaded Statements File For Analysis
_GUICtrlListView_AddColumn($List6, "Stuff - Make Selection", 470)
GUICtrlSetBkColor($List6, $COLOR_aqua)
GUICtrlSetFont(-1, 8.5, 700, 0, "Verdana")
GUICtrlSetState($List6, $GUI_enABLE)
GUICtrlSetState($List6, $GUI_show)

GUICtrlCreateListViewItem ( "ball", $List6 )
GUICtrlCreateListViewItem ( "bat", $List6 )
GUICtrlCreateListViewItem ( "glove", $List6 )

$Radio1A = GUICtrlCreateRadio("Select ", 376, 355, 133, 25)
GUICtrlSetFont(-1, 8.5, 800, 0, "Verdana")

$Label3 = GUICtrlCreateLabel("                                                                                 ", 32, 385, 344, 38, $SS_LEFT)
GUICtrlSetFont(-1, 8.5, 800, 0, "Verdana")

GUISetState(@SW_SHOW)

While 1
    $iMsg = GUIGetMsg()

    Switch $iMsg

        Case $GUI_EVENT_CLOSE

            Exit

    Case $GUI_EVENT_PRIMARYUP

                $List6

                If GUICtrlRead($Radio1A) = 1 Then

                $nmn6 = _GUICtrlListView_GetSelectedIndices($List6)
                MsgBox($MB_SYSTEMMODAL, "Information", " Text: " &  $nmn6) ;JUST AS INFO

                $statementfile = $nmn6  & "    INDEX INFO"

                GUICtrlSetData($Label3, $statementfile)

            EndIf


EndSwitch
WEnd

flagged.

Attached, I've thrown together an example based upon the above first snippet and AGAIN, if you run it in the version i listed above you should see NO flags, but in the latest version you get flags regarding "List6".  And yes there are a bunch of "includes" in the script - I just pulled it from a template I use from my learning files - meaningless for the topic of discussion.

If this error was/is missed in script written in prior version, what else could be missed - anything? What would be the cause or reason for it.  Precisely why I included the version info in my original post - in the interest of "full disclosure". As a newbie I want to know why something doesn't work right as well as when it is right. 

Link to comment
Share on other sites

It is NOT AutoIt.exe but Au3Check which should catch that syntax error, and it IS an error through poor coding.

But please make you absolute point or question more clear, as at the moment it just sounds like you're whining and bitching.

Bugs are in the nature of coding, if it's a bug in an old version then woohoo for you, but no-one cares, it's old.

But I have a feeling that id anyone can be bothered testing it they will receive a syntax error.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

As has been previously stated, if it worked before it was a bug that was corrected in Au3Check. Your code makes no sense as written.

What is your ultimate aim in having a variable on a line by itself, with no declaration statement, no assigning of value, or no comparison check being done to it? A line with just a variable on it is nonsensical, it's not doing anything at all it's just sitting there taking up space.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Its not whining, its not bitching. It is being inquisitive to something new to me. And whoo-hoo to all the folks with the smarts but not the will to PLEASANTLY help one learn from whatever has happened at any point in time.

It is amazing though that people can read a paragraph and really not get the message. Hmmmm.

There was no intention of a variable by itself - period. IT WAS A MISTAKE. READ THAT AGAIN -- A MISTAKE. Yet the editor didn't catch it.  OH yes, I know big whoo-hoo regardless because it happens to be old.

And poor coding is the nature of being a beginner, thus the questions of concern and yet a condescending environment prevails.  

 

 

Link to comment
Share on other sites

relax my friend, if you're asking for help , avoid posting all CAPS, its like yelling/shouting to a person.

Patience is a Virtue.

Edited by 232showtime

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Link to comment
Share on other sites

It isn't the job of the "editor" to catch this mistake: it's Au3Check job. Either a previous version didn't catch it at all or you ran the compiler with muting the error/warning or you ignored the warning.

Then reread the answers you got: you've been told repeatedly and pleasantly what the issue was: Au3Check having been fixed to catch a non-sensical "statement", yet didn't recognize it was an error on your side in the first place. The one shouting is you.

Edited by jchd

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

I don't think it was anyone's intent to get your back up, but anyway at least your answer is clear now.

And (unrelated) it is always a good idea if you are afraid your scripts may break, to look at the script breaking changes in the help file of any further release.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...