![]() Protected all.l=ExamineDirectory(#PB_Any, dir$, "") If DirectoryEntryType(dir) = #PB_DirectoryEntry_Directory YourLinkedList() dir$ DirectoryEntryName(dir) If DirectoryEntryName(dir) "." And DirectoryEntryName(dir) "." ![]() Protected dir.l=ExamineDirectory(#PB_Any, dir$, pattern$) Procedure.i SearchDirectory(dir$, List yourLinkedList.s(), pattern$="", recursive=1) If iLastError=1309 : iLastError=0 : EndIfįormatMessage_(#FORMAT_MESSAGE_FROM_SYSTEM, 0, iLastError, 0, *ErrorBuffer, 1024, 0) Protected sMessage.s, iLastError.i, *ErrorBuffer Procedure.s iGetLastErrorAsText() Used to get Last Win32 API Error GetModuleFileNameEx(hProcess, 0, Len(FilePath$)) HProcess = OpenProcess_(#PROCESS_ALL_ACCESS, 0, Proc32\th32ProcessID) If Process32First_(iSnap, Process32Next_(iSnap, = Space(1024) ISnap = CreateToolhelp32Snapshot_(#TH32CS_SNAPPROCESS, 0) Protected iHit.i = 0, iSnap.i, ImageName$, hProcess.i, FilePath$, Proc32.PROCESSENTRY32 Global giWinID.i, giStringModuleFolder, giStringTemplateFolder.i, giStringPattern.i, giEvent.i, giButton.i, giStatusBar.i, gsDirectoryToSearch.s, gsTemplatesPrefsPath.s, gsMatchStringPattern.s, *buffer, bIsPBIde.b SComment.s used to create a comment, after a declare procedure() this proc changes the pointer etc: and added to the comment section in templatesĮndStructure : NewMap _m_ModuleProcedureData.MODULEDATA() #MyModulesDir$ = "C:\Users\dufus\Documents\Programming\Modules" #DirectoryModules$ = "Directory: Modules " MessageRequester("Warning", "Can not load Psapi.dll" ,#MB_ICONWARNING) Global GetModuleFileNameEx.GetModuleFileNameExA = GetFunction(Lib,"GetModuleFileNameExA") Global GetModuleFileNameEx.GetModuleFileNameExW = GetFunction(Lib,"GetModuleFileNameExW") Global GetModuleFileNameEx.GetModuleFileNameExA Global GetModuleFileNameEx.GetModuleFileNameExW ![]() Prototype.i GetModuleFileNameExA(hProcess.l,hModule.l,*lpFilename,nSize.i) Prototype.i GetModuleFileNameExW(hProcess.l,hModule.l,*lpFilename,nSize.i) \ user is replaced on creating the new templates.prefs file. \ running the program) any other existing data created by the \ installs via this program and replaces it with the current (via \ The program parses the pb templates.prefs file for previous \ modulename, procedurenames) all at a click. \ names, the sub components, ( include modulename, use \ folder in the templates called "Modules", where subfolders are the module \ the declare file/Procedure sections, creating a hierarchical templates.prefs \ Module files Directory pulling all the Procedures within \ The Idea behind this program is to parse recursivly through a Ideal when not in a project (single file work) All procedure declarations are parsed from the declare/endeclare sectionĥ. Re-parsing your modules directory to update replaces any existing modules section already there with the new re- parsed section.ģ. Program needs to be run with ide closed.Ģ. Hi to all Another attempt at quick access to modules, this time a better implementation although I`ve enjoyed learning Ok so this time a modules directory is read(recursively) parses the the ensuing filesĪ templates.prefs compatible string is generated with a directory order, generated 1100 line for all my modules completed in just under a secondġ. Extensively tested (100 ) a lot for me works with out problem. : updated - now uses map`s to make sure modules are unique and recursive search.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |