Jump to content

Search the Community

Showing results for tags 'number of keywords'.

  • 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. Sometimes I wondered how many keywords were used in my particular script. When I was trying to persuade one of my friends to learn coding, I told him that a few hundred words were all he had to learn to speak a decent computer language, while he had to learn several thousand words to speak a decent English as a foreign language. As a proof I counted the number of keywords used in my zPlayer.au3 with the following code and it was 185. As only standard UDF files were used in the script, I think this is a pretty close count. My question: Is there a simpler and more accurate way of counting the number of keywords used in a script, especially when external UDFs are included, in which case the function names are not listed in au3.keywrods.properties file? #include <Array.au3> $sPath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\autoit3.exe", "") $allKeywords = FileReadToArray(StringReplace($sPath, "autoit3.exe", "SciTE\au3.keywords.properties")) $sScript = FileRead("d:\zplayer\zplayer.au3") Local $aKeywordsUsed[1] For $i = 1 To UBound($allKeywords)-1 $sLine = StringStripWS($allKeywords[$i], 3) If StringInStr($sLine, "=") Then $sLine = StringMid($sLine, StringInStr($sLine, "=")+1) EndIf $sLine = StringReplace($sLine, " \", "") $aLine = StringSplit($sLine, " ") For $j = 1 To $aLine[0] If StringInStr($sScript, $aLine[$j]) Then _ArrayAdd($aKeywordsUsed, $aLine[$j]) EndIf Next Next $aKeywordsUsed[0] = UBound($aKeywordsUsed)-1 _ArraySort($aKeywordsUsed, 0, 1) _ArrayDisplay($aKeywordsUsed)
×
×
  • Create New...