New Lib QuickAccessLib quick access to common folders return

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Zebuddi123
Enthusiast
Enthusiast
Posts: 796
Joined: Wed Feb 01, 2012 3:30 pm
Location: Nottinghamshire UK
Contact:

New Lib QuickAccessLib quick access to common folders return

Post by Zebuddi123 »

Hi to all

For my own use i have created this lib for quick access to common folders etc all procedures start with R_ so R_DESKTOP()+"\test.txt" = C:\Users\zebuddi\Desktop\test.txt user id is auto added

55 procedures if it could be useful to you please download

Code: Select all

f$=OpenFileRequester("","","",0)
NewList p$()
;CallDebugger
If OpenFile(0,f$)
	While Eof(0)=0
		a$=ReadString(0)
		If FindString(a$,"ProcedureDLL.s")
			e=FindString(a$,";")
			AddElement(p$())
			p$()=Mid(a$,15,e-15)
			Debug p$()
		EndIf
	Wend
	CloseFile(0)
EndIf	

If OpenFile(0,R_DESKTOP()+"\here.txt") <-------- C:\Users\zebuddi\Desktop\here.txt
StartOfLinkedList(p$())
ForEach p$()
	c+1: WriteStringN(0,Str(c)+". "+p$())
Next
WriteStringN(0, R_DESKTOP()) --- C:\Users\zebuddi\Desktop
WriteStringN(0,R_ADMINTOOLS()) --- C:\Users\zebuddi\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools
WriteStringN(0,R_COMMON_DOCUMENTS()) --- C:\Users\Public\Documents

CloseFile(0)
EndIf


FreeList(p$())

lib is multi option, so Threaded and unicode, 32bit, chm & pdf included, auto installer thanks to gnozal`s tool :)

MD5 386983e28567204f80e93c33aa20b27b

http://goo.gl/CGi5s

Zebuddi. :D

1. R_DESKTOP()
2. R_PROGRAMS()
3. R_PERSONAL()
4. R_FAVORITES()
5. R_STARTUP()
6. R_RECENT()
7. R_SENDTO()
8. R_STARTMENU()
9. R_MYMUSIC()
10. R_MYVIDEO()
11. R_DESKTOPDIRECTORY()
12. R_NETHOOD()
13. R_FONTS()
14. R_TEMPLATES()
15. R_COMMON_STARTMENU()
16. R_COMMON_PROGRAMS()
17. R_COMMON_STARTUP()
18. R_COMMON_DESKTOPDIRECTORY()
19. R_APPDATA()
20. R_PRINTHOOD()
21. R_ALTSTARTUP()
22. R_COMMON_FAVORITES()
23. R_INTERNET_CACHE()
24. R_COOKIES()
25. R_HISTORY()
26. R_COMMON_APPDATA()
27. R_WINDOWS()
28. R_SYSTEM()
29. R_PROGRAM_FILES()
30. R_MYPICTURES()
31. R_PROFILE()
32. R_SYSTEMX86()
33. R_PROGRAM_FILESX86()
34. R_PROGRAM_FILES_COMMON()
35. R_PROGRAM_FILES_COMMONX86()
36. R_COMMON_TEMPLATES()
37. R_COMMON_DOCUMENTS()
38. R_COMMON_ADMINTOOLS()
39. R_ADMINTOOLS()
40. R_COMMON_MUSIC()
41. R_COMMON_PICTURES()
42. R_COMMON_VIDEO()
43. R_CDBURN_AREA()
44. R_INTERNET()
45. R_CONTROLS()
46. R_PRINTERS()
47. R_BITBUCKET()
48. R_MYDOCUMENTS()
49. R_DRIVES()
50. R_NETWORK()
51. R_CONNECTIONS()
52. R_RESOURCES_LOCALIZED()
53. R_COMMON_OEM_LINKS()
54. R_COMPUTERSNEARME()
55. R_PROFILES()
malleo, caput, bang. Ego, comprehendunt in tempore
User avatar
Bisonte
Addict
Addict
Posts: 1313
Joined: Tue Oct 09, 2007 2:15 am

Re: New Lib QuickAccessLib quick access to common folders re

Post by Bisonte »

Hm... is this not the same like this

Code: Select all

Procedure.s GetSpecialFolder(CSIDL) ; Gibt den Pfad eines #CSIDL Ordners zurück. Bsp. : #CSIDL_APPDATA
  
  Protected *itemid.ITEMIDLIST
  Protected location.s = Space(#MAX_PATH)
  
  If SHGetSpecialFolderLocation_ (0, CSIDL, @*itemid) = #NOERROR
    If SHGetPathFromIDList_(*itemid, @location)
      CoTaskMemFree_(*itemid)
      If Right(location, 1) <> "\" : location + "\" 
      EndIf
      ProcedureReturn location
    EndIf
  EndIf
  
EndProcedure
?
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
User avatar
Zebuddi123
Enthusiast
Enthusiast
Posts: 796
Joined: Wed Feb 01, 2012 3:30 pm
Location: Nottinghamshire UK
Contact:

Re: New Lib QuickAccessLib quick access to common folders re

Post by Zebuddi123 »

Hi Bisonte yes it is like i said it was for my own personal use [ My memory is not that great :( ] and i put it out there for anyone who may find it useful like myself

and easier to remember.

Zebuddi :D
malleo, caput, bang. Ego, comprehendunt in tempore
Zach
Addict
Addict
Posts: 1676
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: New Lib QuickAccessLib quick access to common folders re

Post by Zach »

Thanks for sharing. I think this is pretty useful in terms of using a shortcut in my own sources and not having to remember / type out longer stuff 8)
Post Reply