Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; <COMPILER: v1.1.34.03>
- #NoEnv
- #SingleInstance, Force
- SetBatchLines, -1
- #NoTrayIcon
- SetWorkingDir %A_ScriptDir%
- IfNotExist, %A_ScriptDir%\F-ICONS
- FileCreateDir, %A_ScriptDir%\F-ICONS
- FileSetAttrib +HS, %A_ScriptDir%\F-ICONS, 2
- #Include, %A_ScriptDir%\MyFileInstall.txt
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- Gui -Caption +ToolWindow +Border +LastFound +AlwaysOnTop -Border +hWndhGUI
- CustomColor = 884488
- Gui, Color, %CustomColor%
- Gui,Font,cwhite S14 Bold,Verdana ;Calibri
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- Gui, Add, Button, hWndhButton2 x5 y5 w0 h0 gGuiMove,
- Gui, Add,Text, x50 y10, ~~~*** NAJEEB FOLDER MAKER ***~~~
- Gui,Font,cyellow S12 Bold,Verdana ;Calibri
- Gui, Add,Text, x20 y52,Enter Folder Name:-
- Gui, Add,Edit, x210 y50 vFol hwndHED1,
- CtlColor_Edit(HED1, 0xFF22FF, 0xFFFFFF)
- Gui,Font,cyellow S12 Bold,Verdana ;Calibri
- Gui, Add,Text, x20 y86,Enter Icon Number:-
- Gui, Add,Edit, x210 y84 vIco hwndHED2,
- CtlColor_Edit(HED2, 0x8282e3, 0x000000)
- Gui,Font,cyellow S8 Bold,Verdana ;Calibri
- Gui, Add,Button, x427 y86 gMake,Make Folder Icon
- Gui,add,Picture, x410 y36 vActualIcon Icon1 w48 h48 ,
- Gui,Font,cyellow S8 Bold,Verdana ;Calibri
- Gui, Add,Button, x470 y46 gViwe,ICON VIWE
- Gui, Show, x0 y30 w600 h140 Center, NAJEEB FOLDER MAKER
- WinSet, Region, 0-0 W600 H140 R20-20,
- WinMove, 0, 0
- OnMessage( 0x200, "WM_MOUSEMOVE")
- Return
- Viwe:
- Gui, Submit, nohide
- GuiControl,, ActualIcon, %A_ScriptDir%\F-ICONS\%Ico%.ico
- Run, "%A_ScriptDir%\F-ICONS\ICONS.jpg"
- Return
- Make:
- Gui, Submit, nohide
- FileCreateDir %Fol% ; (optional: create a new folder)
- FileSetAttrib +S, %Fol%, 2
- ini=%Fol%\desktop.ini
- ;IniWrite %A_AhkPath%, %ini%, .ShellClassInfo, IconFile
- IniWrite %A_ScriptDir%\F-ICONS\%Ico%.ico, %ini%, .ShellClassInfo, IconFile
- IniWrite 0 , %ini%, .ShellClassInfo, IconIndex
- IniWrite 0 , %ini%, .ShellClassInfo, ConfirmFileOp
- FileSetAttrib +HS, %ini%, 2
- FileCopy, %A_ScriptDir%\F-ICONS\%Ico%.ico, %Fol%\
- FileSetAttrib +HS, %Fol%\%Ico%.ico, 2
- Return
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- GuiMove:
- PostMessage, 0xA1, 2,,, NAJEEB SCRIPT BOOK
- Return
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- WM_MOUSEMOVE(wparam, lparam, msg, hwnd)
- {
- if wparam = 1 ; LButton
- PostMessage, 0xA1, 2,,, A ; WM_NCLBUTTONDOWN
- }
- ; ======================================================================================================================
- ; WM_CTLCOLOREDIT = 0x0133 <- msdn.microsoft.com/en-us/library/windows/desktop/bb761691(v=vs.85).aspx
- ; An edit control that is not read-only or disabled sends the WM_CTLCOLOREDIT message to its parent window
- ; when the control is about to be drawn.
- ; ======================================================================================================================
- CtlColor_Edit(Param1, Param2 := "", Param3 := "") {
- Static Init := OnMessage(0x0133, "CtlColor_Edit")
- Static DCBrush := DllCall("Gdi32.dll\GetStockObject", "UInt", 18, "UPtr") ; DC_BRUSH = 18
- Static Controls := []
- ; If Param1 contains a valid window handle, the function has been called by the user ---------------------------------
- ; Param1 = HWND, Param2 = BackgroundColor, Param3 = TextColor
- If DllCall("IsWindow", "Ptr", Param1, "UInt") {
- Controls.Delete(Param1)
- If (Param2 <> "") {
- Controls[Param1, "BkColor"] := CtlColor_BGR(Param2)
- If (Param3 <> "")
- Controls[Param1, "TxColor"] := CtlColor_BGR(Param3)
- }
- }
- ; Function has been called as message handler -----------------------------------------------------------------------
- ; Param1 (wParam) = HDC, Param2 (lParam) = HWND
- Else If (((BC := Controls[Param2, "BkColor"]) . (TC := Controls[Param2, "TxColor"])) <> "") {
- If (TC <> "")
- DllCall("SetTextColor", "Ptr", Param1, "UInt", TC)
- DllCall("SetBkColor", "Ptr", Param1, "UInt", BC)
- DllCall("SetDCBrushColor", "Ptr", Param1, "UInt", BC)
- Return DCBrush
- }
- }
- ; ======================================================================================================================
- ; Color values must be passed as BGR to GDI functions, this function does the conversion from RGB
- ; ======================================================================================================================
- CtlColor_BGR(RGB) {
- Static HTML := {AQUA: 0xFFFF00, BLACK: 0x000000, BLUE: 0xFF0000, FUCHSIA: 0xFF00FF, GRAY: 0x808080, GREEN: 0x008000
- , LIME: 0x00FF00, MAROON: 0x000080, NAVY: 0x800000, OLIVE: 0x008080, PURPLE: 0x800080, RED: 0x0000FF
- , SILVER: 0xC0C0C0, TEAL: 0x808000, WHITE: 0xFFFFFF, YELLOW: 0x00FFFF}
- Return (HTML.HasKey(RGB) ? HTML[RGB] : ((RGB >> 16) & 0x0000FF) + (RGB & 0x00FF00) + ((RGB & 0x0000FF) << 16))
- }
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #R::Reload ;<-- ~ Reload Script ~
- #S::Suspend ;<-- ~ Suspend Script ~
- #P::Pause ;<-- ~ Pause Script ~
- #M::WinMinimize, ;<-- ~ Minimize Script ~
- ESC::ExitApp ;<-- ~ Exit Script ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement