Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;PasteBin Link Of Font Family List.txt:https://pastebin.com/4EU72urE
- #SingleInstance,Force
- SetWorkingDir,%A_ScriptDir%
- OnMessage(0x201, "WM_LBUTTONDOWN")
- Edit_Color:= "White"
- Set_Window_Size:=0
- Family:=0
- ;Loading Font Faimly Dir
- ;-------------------------------
- FileRead,Temp,Font Family List.txt
- Font_Family_Index := 0
- loop, read,Font Family List.txt
- {
- Font_Family%A_Index% :=A_LoopReadLine
- Font_Family0 = %A_Index%
- }
- Loop,%Font_Family0%
- {
- if A_Index = 1
- List2 .= Font_Family%A_Index% . "||"
- else if A_Index != 1
- List2 .= Font_Family%A_Index% . "|"
- }
- ;-------------------------------------------------------
- ;Loading Font Favourites Dir
- ;-------------------------------
- FileRead,Temp,Font Favourites.txt
- Font_Favorites_Index := 0
- loop, read,Font Favourites.txt
- {
- Font_Favorites%A_Index% :=A_LoopReadLine
- Font_Favorites0 = %A_Index%
- }
- Loop,%Font_Favorites0%
- {
- if A_Index = 2
- List1 .= Font_Favorites%A_Index% . "||"
- else
- List1 .= Font_Favorites%A_Index% . "|"
- }
- ;-------------------------------------------------------
- Gui, 1:Color,Gray,
- Gui, 1:Add, Groupbox, xm ym-5 w830 h150 center Section,Options
- Gui, 1:Add, Groupbox, xs+10 ym+20 w220 h55 Section,Font Family
- Gui, 1:Add, DropDownList,xs+5 ys+20 w200 r20 Sort vFont_Family_Selected gCheck ,%List2%
- Gui, 1:Add, Groupbox, xs w220 h55 Section,Favourites
- Gui, 1:Add, DropDownList,xs+10 ys+20 w200 r20 Sort vFont_Favorites gCheck1,%List1%
- Gui, 1:Add, Groupbox, x250 ym+20 w120 h117 Section,Save / Delete
- Gui, 1:Add, Button, xs+10 ys+20 w100 h30 gAdd_To_Favourites,Add To Favourites
- Gui, 1:Add, Button, xp yp+55 w100 h30 gRemove_From_Favourites,Remove From Favourites
- Gui, 1:Add, Groupbox, x380 ym+20 w220 h55 Section,Type Colour
- Gui, 1:Add, DropDownList,xs+10 ys+20 w200 r20 vFont_Color gUpdate_Font,Black||Silver|Gray|White|Maroon|Red|Purple|Fuchsia|Green|Lime|Olive|Yellow|Navy|Blue|Teal|Aqua|
- Gui, 1:Add, Groupbox, xs w220 h55 Section,Type Size
- Gui, 1:Font,cBlack s16 Bold
- Gui, 1:Add, Edit, xs+10 ys+20 w180 h30 vFont_Size gUpdate_Font
- Gui, 1:Add, UpDown, range1-200,12
- Gui, 1:Font,
- Gui, 1:Add, Groupbox,x610 ym+20 w220 h55 Section,Background Colour
- Gui, 1:Add, DropDownList,xs+10 ys+20 w200 r20 vEdit_Color gUpdate_Edit,Black|Silver|Gray|White||Maroon|Red|Purple|Fuchsia|Green|Lime|Olive|Yellow|Navy|Blue|Teal|Aqua|
- Gui, 1:Add, Checkbox, xs ys+65 w100 BackgroundTrans vBold_Font gUpdate_Font,Bold
- Gui, 1:Add, Checkbox, x+20 ys+65 BackgroundTrans vUnderline_Font gUpdate_Font,Underline
- Gui, 1:Add, Checkbox, xs yp+30 w100 BackgroundTrans vItalic_Font gUpdate_Font,Italic
- Gui, 1:Add, Checkbox, x+20 w100 BackgroundTrans vStrike_Font gUpdate_Font,Strike
- Gui, 1:Color,Gray,%Edit_Color%
- Gui, 1:Add, Edit, xm w830 h270 vFont_Display,Sample Text`n1 2 3 4 5 6 7 8 9 0`na A b B c C d D e E f F g G h H i I j J k K l L m M n N o O p P q Q r R s S t T u U v V w W x X y Y z Z
- Gui, 1:Add, Edit, xm w730 h20 vGui_Display,
- Gui, 1:Add, Button, x+10 w90 h20 gReload,Reload
- Gui,1:+AlwaysOnTop
- Gui,1:-Caption ;+Owner
- Gui, 1:Show, x100 y100 w850 h470,Font Tool
- SetTimer,Watch_Window,400
- return
- Watch_Window:
- WinGetTitle,Active_Window,A
- if(Active_Window!="Font Tool"&&Set_Window_Size==0)
- {
- WinGetTitle,New_Active_Window,A
- Gui,1:Show,x1300 y700 w50 h20,Font Tool
- WinActivate,%New_Active_Window%
- Set_Window_Size:=1
- }
- if(Active_Window=="Font Tool"&&Set_Window_Size==1)
- {
- Gui, 1:Show,x500 y100 w850 h470,Font Tool
- Set_Window_Size:=2
- }
- if(Set_Window_Size==2&&Active_Window!="Font Tool")
- {
- Set_Window_Size:=0
- }
- return
- GuiClose:
- ExitApp
- Reload:
- Reload
- return
- Check:
- Family:=0
- gosub, Update_Font
- return
- Check1:
- Family:=1
- gosub, Update_Font
- return
- Update_Edit:
- Gui, 1:Submit,NoHide
- Gui, 1:Color,,%Edit_Color%
- return
- Update_Font:
- Gui, 1:Submit,NoHide
- Gui,1:Font,
- if(Font_Size>200)
- {
- Font_Size:=200
- GuiControl,1:,Font_Size,200
- }
- if(Font_Size<1)
- {
- Font_Size:=1
- GuiControl,1:,Font_Size,1
- }
- if(Bold_Font==1)
- Bold1:="Bold"
- if(Bold_Font==0)
- {
- Gui,1:Font,
- Bold1:=""
- }
- if(Underline_Font==1)
- Underline1:="Underline"
- if(Underline_Font==0)
- {
- Gui,1:Font,
- Underline1:=""
- }
- if(Italic_Font==1)
- Italic1:= "Italic"
- if(Italic_Font==0)
- {
- Gui,1:Font,
- Italic1:=""
- }
- if(Strike_Font==1)
- Strike1:="Strike"
- if(Strike_Font==0)
- {
- Gui,1:Font,
- Strike1:=""
- }
- if(Family==0)
- {
- Gui,1:Font,
- Gui, 1:Font,c%Font_Color% s%Font_Size% %Underline1% %Bold1% %Italic1% %Strike1% Q4,%Font_Family_Selected%
- Gui_Out := Font_Family_Selected
- }
- if(Family==1)
- {
- Gui,1:Font
- Gui, 1:Font,c%Font_Color% s%Font_Size% %Underline1% %Bold1% %Italic1% %Strike1% Q4,%Font_Favorites%
- Gui_Out := Font_Favorites
- }
- GuiControl,1:Font,Font_Display
- Gui,1:Font,
- Gui,1:Font,c%Font_Color%
- GuiControl,1:Font,Gui_Display
- Gui,1:Font,s16
- GuiControl,1:Font,Font_Size
- GuiControl,1:,Gui_Display,% "Gui,Font,c" Font_Color " s" Font_Size " " Underline1 " " Bold1 " " Italic1 " " Strike1 " Q4," Gui_Out
- Gui,1:Font,
- return
- Add_To_Favourites:
- FileAppend,%Font_Family_Selected%`n,Font Favourites.txt
- GuiControl,1:,Font_Favorites,%Font_Family_Selected%
- return
- Remove_From_Favourites:
- MsgBox, 262144, Remove Font Family From Favourites, Open the file called Font Favourites.txt and delete the one you don't want anymore.`n`nDid you think I was going to do everything for you? For free? `nlol you are funny lol`n`nNo really just delete the font family from the text doc and you are good to go.
- Run, Font Favourites.txt
- return
- WM_LBUTTONDOWN() {
- IfWinActive,Font Tool
- PostMessage, 0xA1, 2
- }
- ;~ ~Up::
- ;~ MouseGetPos,,,Active_Window,Ctrl
- ;~ ControlGetText, TUM , %Ctrl%, ahk_id %Active_Window%
- ;~ FileAppend,%TUM%`n,Temp text file to test.txt
- ;~ return
- ;~ ~Down::
- ;~ MouseGetPos,,,Active_Window,Ctrl
- ;~ ControlGetText, TUM , %Ctrl%, ahk_id %Active_Window%
- ;~ FileAppend,%TUM%`n,Temp text file to test.txt
- ;~ return
- Esc::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement