Advertisement
Najeebsk

FOLDER-MAKER.ahk

Jul 29th, 2022
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; <COMPILER: v1.1.32.00>
  2. #Warn
  3. #NoEnv
  4. #SingleInstance, Force
  5. SendMode Input
  6. SetWorkingDir %A_ScriptDir%
  7. Icon=
  8. (Ltrim Join|
  9. SELECT FOLDER ICON||0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|
  10. )
  11. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  12. Gui +LastFound +AlwaysOnTop -Caption +ToolWindow +Border
  13. ;Gui, +LastFound -Caption +AlwaysOnTop
  14. ;Gui, color, 213410, 213410
  15. ;Gui, Color, 884488
  16. CustomColor = 884488
  17. Gui, Color, %CustomColor%
  18. ;WinSet, TransColor, %CustomColor% 150
  19. Gui,Font,S14 Bold,Verdana
  20. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  21. Gui, Show, x250 y250 H100 W400, NAJEEB FOLDER
  22. WinSet, Region, 0-0 W400 H100 R20-20,
  23.  
  24. Gui, Font,  S16 CDefault Bold, Verdana
  25. Gui, Add, Text, x50 w400 h30, NAJEEB FOLDER MAKER
  26. Gui, Font,  S12 CDefault Bold, Verdana
  27. Gui, Add, DropDownList, x75 y50 w220 vIcon gFol, %ICON%
  28. RETURN
  29. Fol:
  30. Gui, Submit, NoHide
  31. FileCreateDir, N-Folder
  32. ;GuiControl, ,Icon,0
  33. SetFolderIcon(A_Desktop . "\N-Folder", A_ScriptDir . "\FOL.dll", Icon)
  34. SetFolderIcon(folderPath, iconPath, iconIndex)  {
  35.    static FCSM_ICONFILE := 0x10, FCS_FORCEWRITE := 0x2
  36.    if !A_IsUnicode  {
  37.       VarSetCapacity(WiconPath, StrPut(iconPath, "UTF-16")*2, 0)
  38.       StrPut(iconPath, &WiconPath, "UTF-16")
  39.    }
  40.    VarSetCapacity(SHFOLDERCUSTOMSETTINGS, size := 4*5 + A_PtrSize*10, 0)
  41.    NumPut(size, SHFOLDERCUSTOMSETTINGS)
  42.    NumPut(FCSM_ICONFILE, SHFOLDERCUSTOMSETTINGS, 4)
  43.    NumPut(A_IsUnicode ? &iconPath : &WiconPath, SHFOLDERCUSTOMSETTINGS, 4*2 + A_PtrSize*8)
  44.    NumPut(iconIndex, SHFOLDERCUSTOMSETTINGS, 4*2 + A_PtrSize*9 + 4)
  45.    DllCall("Shell32\SHGetSetFolderCustomSettings", Ptr, &SHFOLDERCUSTOMSETTINGS, WStr, folderPath, UInt, FCS_FORCEWRITE)
  46. }
  47. return
  48. GuiClose:
  49. ExitApp
  50. ;==========================
  51. #R::Reload  ;<--  ~ Reload Script ~
  52. #S::Suspend ;<--  ~ Suspend Script ~
  53. #P::Pause   ;<--  ~ Pause Script ~
  54. #M::WinMinimize, ;<--  ~ Minimize Script ~
  55. ESC::ExitApp     ;<--  ~ Exit Script ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement