Code: Alles auswählen
Interface iTEST
Debug1() ;@Proc1()
DebugHello() ;@proc2()
DebugMySelf() ;@proc3()
Dbug(val.l) ;@proc4()
EndInterface
Interface iTEST2;interface2
DebugONE();@Proc1()
DebugHello() ;@procTwo()
Debughmmmm();dontknow...
DebugMySelf() ;@proc3()
ehm()
;LastOne:
Dbug(val.l) ;@proc4()
EndInterface
folgendes:
Code: Alles auswählen
;iTEST
*vTable\Method[0] = @Proc1()
*vTable\Method[1] = @proc2()
*vTable\Method[2] = @proc3()
*vTable\Method[3] = @proc4()
;iTEST2
*vTable\Method[0] = @Proc1()
*vTable\Method[1] = @procTwo()
*vTable\Method[3] = @proc3()
*vTable\Method[5] = @proc4()
also einfach die interfaces nach obigem beispiel schreiben, das tool ausführen, und das ergebnis ist in der zwischenablage.
hier nun der code:
Code: Alles auswählen
FilePath$ = ProgramParameter()
TempFilePath$ = ProgramParameter() : If FilePath$ = "" : FilePath$ = TempFilePath$ : EndIf
If ReadFile(0, FilePath$) = 0 : MessageRequester("Error", "can't read '" + FilePath$ + "'") : End : EndIf
NewList Result.s()
While Eof(0) = #False
Line$ = LTrim(ReadString())
If Left(Line$, Len("Interface")) = "Interface"
If CountString(Line$, ";") : Line$ = Left(Line$, FindString(Line$, ";", 1) - 1) : EndIf
Line$ = RemoveString(Line$, " ")
InterfaceName$ = Right(Line$, Len(Line$) - Len("Interface"))
;
AddElement(Result()) : Result() + ";" + InterfaceName$ + #CRLF$
index.l = 0
Repeat
Line$ = RemoveString(ReadString(), " ")
If Left(Line$, Len("EndInterface")) = "EndInterface" Or Eof(0) = #True : Break : EndIf
SepPos.l = FindString(Line$, ");@", 1)
If SepPos
Result() + "*vTable\Method[" + Str(index) + "]" + Chr(9) + "= " + Mid(Line$, SepPos + 2, Len(Line$) - SepPos - 1) + #CRLF$
index + 1
ElseIf FindString(Line$, ")", 1)
If FindString(Line$, ";", 1)
If FindString(Line$, ")", 1) < FindString(Line$, ";", 1)
index + 1
EndIf
Else
index + 1
EndIf
EndIf
ForEver
EndIf
Wend
ForEach Result()
CurRes.l + 1
Message$ = "result " + Str(CurRes) + "/" + Str(CountList(Result())) + " in clipboard"
If CurRes < CountList(Result())
Message$ + #CRLF$ + "push OK to continue"
EndIf
SetClipboardText(Result())
MessageRequester("", Message$)
Next
wer will kann ihn natürlich gerne erweitern/verändern
edit: hatte noch einen kleinen schönheitsfehler drin. nun geht das ganze auch mit unvollständig ausgefüllten interfaces.