CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 03:36:07 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=a2413a9c6e322de9d24a85498d92f62afa6e5495c6b4b5b2d0ae4adc41bbcb80a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22hVCcb-3mERF_ZFh227vO_o84cDGwEgaZ%22%3B%7D; HttpOnly; Path=/
cf-ray: 98cb4fb20daeb277-BLR
SaveFolders (PureBasic, Linux) - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Declare Create_ini(ini$)
- UsePNGImageDecoder()
- If OpenWindow(0, 100, 150, 300, 100, "SaveFolders - SysTray", #PB_Window_SystemMenu | #PB_Window_Invisible)
- ; CompilerIf #PB_Compiler_OS = #PB_OS_Linux
- ; some Linux and x86 specific code.
- ; CompilerEndIf
- CatchImage(0, ?folder24_png)
- CatchImage(1, ?folder_png)
- AddSysTrayIcon(0, WindowID(0), ImageID(0)) ; иконка в трее
- SysTrayIconToolTip(0, "SaveFolders") ; Название проги в подсказке
- ArrSize = 100
- Dim ArrPath.s(ArrSize)
- Repeat
- CreatePopupImageMenu(0)
- ; получаем путь к ини по имени программы
- ini$ = GetPathPart(ProgramFilename()) + GetFilePart(ProgramFilename(), #PB_FileSystem_NoExtension) + ".ini"
- ; Debug ini$
- If FileSize(ini$) = -1 And Not Create_ini(ini$)
- MessageRequester("Ошибка", "Не найден файл и не удаётся создать" + #CRLF$ + ini$)
- End
- EndIf
- ; заполнение массива
- OpenPreferences(ini$)
- i=0
- ExaminePreferenceGroups()
- While NextPreferenceGroup()
- tmp$ = PreferenceGroupName()
- OpenSubMenu(tmp$, ImageID(1))
- ; Debug tmp$
- ExaminePreferenceKeys()
- While NextPreferenceKey()
- ; Param.s = PreferenceKeyValue()
- ; If Param<>""
- ; Param = " - параметры: "+Param
- ; EndIf
- tmp$ = PreferenceKeyName()
- If Not FileSize(tmp$) = -2 ; Если путь не является существующим каталогом, то игнор и следующий
- Continue
- EndIf
- i+1
- If i > ArrSize
- ArrSize + 100
- ReDim ArrPath(ArrSize)
- EndIf
- MenuItem(i, tmp$, ImageID(1))
- ArrPath(i) = tmp$
- ; Debug tmp$
- Wend
- CloseSubMenu()
- Wend
- ClosePreferences()
- MenuBar()
- OpenSubMenu("Меню")
- MenuItem(997, "Перезапуск ini")
- MenuItem(998, "Открыть ini")
- MenuItem(999, "Выход")
- CloseSubMenu()
- ; MenuItem(998, "Инфа")
- ; Q = 0
- ; Dim ArrProg.s(3)
- ; ArrProg(1) = "geany"
- Prog.s = ""
- If FileSize("geany")
- Prog.s = "geany"
- ElseIf FileSize("xed")
- Prog.s = "xed"
- ElseIf FileSize("gedit")
- Prog.s = "gedit"
- EndIf
- tmp$ = ""
- Repeat
- Event = WaitWindowEvent()
- If Event = #PB_Event_SysTray
- Select EventType()
- Case #PB_EventType_LeftClick, #PB_EventType_RightClick
- DisplayPopupMenu(0, WindowID(0)) ; показ вспывающего меню
- EndSelect
- EndIf
- If Event = #PB_Event_Menu
- em = EventMenu()
- If em >= 1 And em <= i
- ; If FindString(ArrPath(em) , " ")
- ; tmp$ = ReplaceString(ArrPath(em) , "/" , Chr(34)+"/"+Chr(34), #PB_String_NoCase)+Chr(34)
- ; tmp$ = LTrim(tmp$, Chr(34))
- ; ; tmp$ = RTrim(tmp$, Chr(34))
- ; Else
- ; tmp$ = ArrPath(em)
- ; EndIf
- ; RunProgram("nemo", ArrPath(em), "")
- RunProgram("nemo", Chr(34)+ArrPath(em)+Chr(34), "")
- ; RunProgram("nemo", tmp$, "")
- ; Debug "nemo " + ArrPath(em)
- ; Debug tmp$
- ElseIf em = 997
- Break
- ElseIf em = 998
- If Prog.s <> ""
- RunProgram(Prog.s, ini$, "")
- EndIf
- ElseIf em = 999
- FreeMenu(0)
- FreeArray(ArrPath())
- CloseWindow(0)
- End
- EndIf
- EndIf
- ForEver
- FreeMenu(0)
- FreeArray(ArrPath())
- ArrSize = 100
- Dim ArrPath(ArrSize)
- ForEver
- EndIf
- End
- Procedure Create_ini(ini$)
- Protected hfile, Text$
- Text$ = "[System]" + #CRLF$ + GetHomeDirectory() + #CRLF$ + "/usr/share/backgrounds" + #CRLF$ + "/usr/share/icons" + #CRLF$ + "/usr/share/themes" + #CRLF$ + "/usr/share/applications" + #CRLF$ + #CRLF$ + "[PureBasic]" + #CRLF$ + GetCurrentDirectory() + #CRLF$ + #PB_Compiler_Home
- hfile = OpenFile(#PB_Any, ini$, #PB_UTF8)
- If hfile
- If WriteStringFormat(hfile, #PB_UTF8)
- WriteString(hfile, Text$, #PB_UTF8)
- CloseFile(hfile)
- ProcedureReturn 1
- EndIf
- CloseFile(hfile)
- EndIf
- ProcedureReturn 0
- EndProcedure
- DataSection
- folder_png:
- IncludeBinary "images/folder.png"
- folder_pngend:
- folder24_png:
- IncludeBinary "images/folder24.png"
- folder24_pngend:
- EndDataSection
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ X
JavaScript | 2 sec ago | 0.24 KB
-
⭐⭐⭐Crypto Accounts⭐⭐
Java | 5 sec ago | 0.10 KB
-
✅⭐ Make huge profits on trading ⭐⭐ D
JavaScript | 6 sec ago | 0.24 KB
-
⭐⭐⭐GMAIL Logs (2FA disabled)⭐⭐
Java | 16 sec ago | 0.10 KB
-
⭐✅ MAKE $2500 IN 15 MIN⭐⭐⭐ G
JavaScript | 19 sec ago | 0.24 KB
-
⭐⭐⭐MAKE $9OO INSTANTLY D G⭐⭐
Java | 28 sec ago | 0.10 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ B
JavaScript | 31 sec ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ W
JavaScript | 33 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand