AutoHotkey Community

It is currently May 26th, 2012, 3:28 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Getting list of subs
PostPosted: March 13th, 2009, 11:53 pm 
Offline

Joined: January 23rd, 2008, 6:38 pm
Posts: 162
Is it possible to dynamically get a list of Sub's in a given program.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 14th, 2009, 3:12 am 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
Yes with grep(). I couldn't quite get it due to my RegEx skills (or lack of).

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 14th, 2009, 6:01 am 
Offline

Joined: May 28th, 2008, 2:11 am
Posts: 739
Location: Minnesota, USA
Only did a little bit of testing, but this should do it I think
Code:
FileRead, dat, AHK.ahk
Sub = 0
While (Sub := RegExMatch(dat, "m)^(.*?)(?<!:):\s*(;.*?)?$", Str, Sub + 1))
   MsgBox % Str1

_________________
Unless otherwise stated, all code is untested

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 14th, 2009, 6:03 am 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
Your question isn't very clear to me. Are you looking for a coding helper such as one of these?

1. TillaGoto - Go to functions, labels & hks in your script
2. List functions (+ labels + hotstuff) in an AutoHotkey script
3. PSPad Label Helper - display a list of labels found in PSPad
4. Coding helper - Jump to any label of function.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 16th, 2009, 1:16 am 
slanter - lol, I didn't think of doing it that way. great idea.

tnx.

That's exactly what I was looking for. I constantly am adding functions (subs) to a program of mine, and have a little hotkey that allows me to pick one to run, and I want them to all be in the list (without having to add them each time).


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, Yahoo [Bot] and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group