Jump to content

Pull function names.


Recommended Posts

I need a quick way to pull all the function names from an autoit file i could make a autoit script to do this but at the moment im very busy so i was wondering does anyone else have a way to do this.

[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Link to comment
Share on other sites

  • Developers

$Scriptname = "C:\Program Files\AutoIt3\Include\date.au3" 
$Array = StringRegExp(FileRead($Scriptname), "(?i)\n[\s]*Func[\s]*(.*?)\(", 3)
for $i = 0 to UBound($array) - 1
    ConsoleWrite('$array[$i] = ' & $array[$i] & @crlf)
Next

:P

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

$Scriptname = "C:\Program Files\AutoIt3\Include\date.au3" 
$Array = StringRegExp(FileRead($Scriptname), "(?i)\n[\s]*Func[\s]*(.*?)\(", 3)
for $i = 0 to UBound($array) - 1
    ConsoleWrite('$array[$i] = ' & $array[$i] & @crlf)
Next

:P

"(?i)(?:^|\n)\s*func\s+(\w+)\s*\("

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...