Sign in to follow this  
Followers 0
MerkurAlex

Pull function names.

5 posts in this topic

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]

Share this post


Link to post
Share on other sites



I smell a short script with FileRead and RegEx coming...


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
Share on other sites

$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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thanks.

I love this community!


[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]

Share this post


Link to post
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
Sign in to follow this  
Followers 0