Jump to content

Search the Community

Showing results for tags '_stringsize'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I have a script that calls _ExtMsgBox() from time to time to show progress through the test script by displaying the current line number and I'm getting a subscripting error. My script makes this call: _ExtMsgBox($MB_ICONINFORMATION, "OK", "Test", @ScriptLineNumber) The error was: "C:\Andy\AutoIT-src\myLib\_ExtMsgBox.au3" (787) : ==> Subscript used on non-accessible variable.: _ExtMsgBoxSet(0, 0, -1, -1, 10, "Courier New", $aRet[2] + 70) _ExtMsgBoxSet(0, 0, -1, -1, 10, "Courier New", $aRet^ ERROR I traced it to a problem in _StringSize() where it returns an error if the first parameter is not a string. The code in _ExtMsgBox() does not check for an error and assumes that _StringSize() returns an array. However, it returns a 0, causing the subssript error. The problem is that because AutoIT has non-typed variables, a text string of all digits and a numeric value both fail the IsString() test. For example, both of these calls fail: So there really are 2 issues here: 1) The _ExtMsgBox() code does not check for an error return from _StringSize() 2) _StringSize() fails when a string containing all digits is passed as the first parameter. I commented out the "if not isString" test and it all worked OK. I don't know why this check is there as a call with a number as the first parameter just displays the number as a string of digits.
×
×
  • Create New...