Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance,force
- CoordMode,Mouse,Screen
- SetWorkingDir,%A_ScriptDir%
- #NoEnv
- IfNotExist Dock-It Data.ini
- {
- Loop 9
- {
- IniWrite,UnNamed Dock %A_Index%,Dock-It Data.ini,Dock Names,Dock %A_Index%
- }
- Prg:="Empty"
- PRG_Notes:="Empty"
- DI:=1
- DCB:=1
- Gui,Loading_Progress:Destroy
- Gui,Loading_Progress:+AlwaysOnTop -Caption +Owner +Border
- MouseGetPos,px,py
- Gui,Loading_Progress:Color,Black
- Gui,Loading_Progress:Add,Text,cWhite x5 y3 w70 ,Building Profile
- Gui,Loading_Progress:Add,Progress,x+5 y5 w50 h10 BackgroundBlack cMaroon Range0-540 vLoading_Value Border,0
- tpx:=px+20,tpy:=py+20
- Gui,Loading_Progress:Show,x%tpx% y%tpy% w140 h20
- Loop 9
- {
- Loop 60
- {
- ;Button name
- if(DCB=1||DCB=61||DCB=121||DCB=181||DCB=241||DCB=301||DCB=361||DCB=421||DCB=481||DCB=541)
- IniWrite,Close,Dock-It Data.ini,Dock %DI% Info,Button Name %DCB%
- else if(DCB=6||DCB=66||DCB=126||DCB=186||DCB=246||DCB=306||DCB=366||DCB=426||DCB=486||DCB=546)
- IniWrite,Settings,Dock-It Data.ini,Dock %DI% Info,Button Name %DCB%
- else
- IniWrite,Unused Button %DCB%,Dock-It Data.ini,Dock %DI% Info,Button Name %DCB%
- IniWrite,%PRG%,Dock-It Data.ini,Dock %DI% Info,Button Program %DCB%
- IniWrite,%PRG_Notes%,Dock-It Data.ini,Dock %DI% Info,Button Notes %DCB%
- DCB++
- GuiControl,Loading_Progress:,Loading_Value,% DCB
- MouseGetPos,px,py
- tpx:=px+20,tpy:=py+20
- Gui,Loading_Progress:Show,x%tpx% y%tpy%
- }
- DI++
- }
- Gui,Loading_Progress:Destroy
- IniRead,test,Dock-It Data.ini,Dock 1 Info, Button Program 23
- }
- global Dock_Names:=[]
- Loop 9
- {
- IniRead,temp,Dock-It Data.ini,Dock Names,Dock %A_Index%
- Dock_Names[A_Index]:=temp
- }
- global Button_Name:=[]
- global Program_Name:=[]
- global Program_Notes:=[]
- DI:=1
- DCB:=1
- Gui,Loading_Progress:Destroy
- Gui,Loading_Progress:+AlwaysOnTop -Caption +Owner +Border
- Gui,Loading_Progress:Color,Black
- Gui,Loading_Progress:Add,Text,cWhite x5 y3 w70 ,Loading Profile
- Gui,Loading_Progress:Add,Progress,x+5 y5 w50 h10 BackgroundBlack cMaroon Range0-540 vLoading_Value Border,0
- Gui,Loading_Progress:Show, w140 h20
- Loop 9
- {
- Loop 60
- {
- IniRead,tem1,Dock-It Data.ini,Dock %DI% Info,Button Name %DCB%
- IniRead,tem2,Dock-It Data.ini,Dock %DI% Info,Button Program %DCB%
- IniRead,tem3,Dock-It Data.ini,Dock %DI% Info,Button Notes %DCB%
- Button_Name[DCB] :=tem1
- Program_Name[DCB] :=tem2
- Program_Notes[DCB] :=tem3
- DCB++
- GuiControl,Loading_Progress:,Loading_Value,% DCB
- }
- DI++
- }
- Gui,Loading_Progress:Destroy
- Global Theme_Counter:=1,Y_Start_Pos:=(A_ScreenHeight//2)-300,Expanded_Window:=0,X_Start_Pos:=-137,X_Start_Pos2:=-137
- ,Theme_Color:=["Teal","Yellow","Maroon","Green","Red","Silver","Blue","White","Purple"]
- ,Lock_It:=0,THBC:=Theme_Color[2],TTTC:=Theme_Color[6],Dock_Open:=0,DBC:=11,i:=1
- Gui,1:+AlwaysOnTop -Caption Owner OwnDialogs +LastFound HwndHellbentHwnd
- Winset,TransColor,Lime
- Gui,2:+AlwaysOnTop -Caption Owner1 +LastFound
- Winset,Transparent,1
- Gui,1:Color,222222,Black
- Gui,2:Color,222222,Black
- Gui,1:Add,Progress,x130 y0 w20 h280 BackgroundLime
- Gui,1:Add,Progress,x130 y320 w20 h280 BackgroundLime
- Gui,1:Add,Progress,x137 y285 w10 h30 Background008844 vSlide_Lock
- Gui,1:Add,Progress,x0 y0 w130 h600 Background%THBC% c111111 ,100
- Gui,1:Add,Progress,x10 y7 w110 h25 Background%THBC% c111111 ,100
- Gui,1:Add,Progress,x20 y7 w90 h20 Background%THBC% c222222 ,100
- Gui,1:Font,c%TTTC% s14 Q5,Segoe UI black
- Gui,1:Add,Text,x20 y4 w90 Center BackgroundTrans,Dock-It
- Gui,1:Font,c%TTTC% s8 Bold Q5,Khmer UI
- BN:=1,BY1:=50,BY2:=51,BY3:=58
- Loop % DBC
- {
- Gui,1:Add,Progress,x10 y%BY1% w110 h30 BackgroundBlack vButton_%BN%_1
- Gui,1:Add,Progress,x10 y%BY1% w109 h29 Background%THBC% vButton_%BN%_2
- Gui,1:Add,Progress,x11 y%BY2% w108 h28 Background222222 vButton_%BN%_3
- if(BN=10)
- Gui,1:Add,Text,x11 y%BY3% w108 BackgroundTrans Center vButton_%BN%_4,Settings
- else if(BN=11)
- Gui,1:Add,Text,x11 y%BY3% w108 BackgroundTrans Center vButton_%BN%_4,EXIT
- else
- Gui,1:Add,Text,x11 y%BY3% w108 BackgroundTrans Center vButton_%BN%_4,% Dock_Names[BN]
- BN++,BY1+=50,BY2+=50,BY3+=50
- }
- BN:=1,BY:=50
- Loop % DBC
- {
- if(BN=11)
- Gui,2:Add,Text,x10 y%BY% w110 h30 vDock_Button_%BN% gGuiClose
- else if(BN=10)
- Gui,2:Add,Text,x10 y500 w110 h30 vDock_Button_%BN%
- else
- Gui,2:Add,Text,x10 y%BY% w110 h30 vDock_Button_%BN% gOpen_Dock
- BN++,BY+=50
- }
- Gui,1:Show,x-137 y%Y_Start_Pos% w150 h600,Dock It1
- Gui,2:Show,x-137 y%Y_Start_Pos% w130 h600,Dock It
- gosub,Build_Docks
- SetTimer,Watch_Window,10
- return
- GuiClose:
- ExitApp
- 2GuiContextMenu:
- GuiContextMenu:
- ;~ if(GetKeyState("ctrl")&&GetKeyState("Shift"))
- ;~ {
- ;~ msgbox, here
- ;~ }
- ;~ else
- ;~ {
- Lock_It:=!Lock_It
- if(Lock_It)
- GuiControl,1:+BackgroundMaroon,Slide_Lock
- else
- GuiControl,1:+Background008844,Slide_Lock
- ;~ }
- return
- Open_Dock:
- if(GetKeyState("ctrl")&&GetKeyState("Shift"))
- {
- StringTrimLeft,Cur_Dock,A_GuiControl,12
- gosub,Name_Dock
- }
- else if(Dock_Open=0)
- {
- StringTrimLeft,Cur_Dock,A_GuiControl,12
- (Cur_Dock=1) ? (Win1:=3,Win2:=4) : (Cur_Dock=2) ? (Win1:=5,Win2:=6) : (Cur_Dock=3) ? (Win1:=7,Win2:=8)
- : (Cur_Dock=4) ? (Win1:=9,Win2:=10) : (Cur_Dock=5) ? (Win1:=11,Win2:=12) : (Cur_Dock=6) ? (Win1:=13,Win2:=14)
- : (Cur_Dock=7) ? (Win1:=15,Win2:=16) : (Cur_Dock=8) ? (Win1:=17,Win2:=18) : (Cur_Dock=9) ? (Win1:=19,Win2:=20)
- Dock_Open:=1,Dock_Expanded:=0
- }
- else if(Dock_Open=1&&Dock_Expanded=1)
- {
- Close_Dock=1
- ;~ Dock_Open:=1,Dock_Expanded:=0
- }
- return
- Run_Program_Or_Edit:
- MouseGetPos,tmx,tmy,www,cw
- GuiControlGet,tname,%Win2%:Name,%cw%
- StringTrimLeft,cbs,tname,7
- if(tname="Button_1"||tname="Button_61"||tname="Button_121"||tname="Button_181"||tname="Button_241"
- ||tname="Button_301"||tname="Button_361"||tname="Button_421"||tname="Button_481")
- Close_Dock:=1
- else
- Try{
- Run, % Program_Name[cbs]
- }Catch{
- gosub,Update_New_Button_Info
- }
- return
- Watch_Window:
- WingetPos,twx,twy,tww,twh,Dock It
- MouseGetPos,tmx,tmy,www,cw
- if(Expanded_Window=0&&tmx<=twx+tww+20&&Lock_It=0)
- {
- while X_Start_Pos<=-8
- {
- X_Start_Pos+=10,X_Start_Pos2+=10
- Gui,1:Show,x%X_Start_Pos% ,Dock It1
- Gui,2:Show,x%X_Start_Pos2% ,Dock It
- }
- X_Start_Pos:=-3,X_Start_Pos2:=-3
- Gui,1:Show,x%X_Start_Pos% ,Dock It1
- Gui,2:Show,x%X_Start_Pos2% ,Dock It
- Expanded_Window:=1
- }
- else if(Expanded_Window=1&&tmx>=twx+tww&&Dock_Open=0)
- {
- while X_Start_Pos>=-131
- {
- X_Start_Pos-=10,X_Start_Pos2-=10
- Gui,1:Show,x%X_Start_Pos% ,Dock It1
- Gui,2:Show,x%X_Start_Pos2% ,Dock It
- }
- X_Start_Pos:=-136,X_Start_Pos2:=-136
- Gui,1:Show,x%X_Start_Pos% ,Dock It1
- Gui,2:Show,x%X_Start_Pos2% ,Dock It
- Expanded_Window:=0
- }
- if(Dock_Open=1&&Dock_Expanded=0)
- {
- DockX:=-810
- while DockX <=-10
- {
- DockX+=30
- Gui,%Win1%:Show,x%DockX% ,Dock
- Gui,%Win2%:Show,x%DockX% ,Dock
- }
- DockX:=0,Dock_Expanded:=1
- Gui,%Win1%:Show,x%DockX% ,Dock
- Gui,%Win2%:Show,x%DockX% ,Dock
- }
- else if((Dock_Expanded=1&&tmx>810)||Close_Dock=1)
- {
- while DockX >=-810
- {
- DockX-=30
- Gui,%Win1%:Show,x%DockX% ,Dock
- Gui,%Win2%:Show,x%DockX% ,Dock
- }
- DockX:=-810,Dock_Expanded:=0,Dock_Open:=0,Close_Dock:=0
- Gui,%Win1%:Show,x%DockX% ,Dock
- Gui,%Win2%:Show,x%DockX% ,Dock
- }
- return
- Build_Docks:
- Gui,Loading_Progress:Destroy
- Gui,Loading_Progress:+AlwaysOnTop -Caption +Owner +Border
- Gui,Loading_Progress:Color,Black
- Gui,Loading_Progress:Add,Text,cWhite x5 y3 w50 ,LOADING...
- Gui,Loading_Progress:Add,Progress,x+5 y5 w50 h10 BackgroundBlack cMaroon Range0-540 vLoading_Value Border,0
- tpx:=px+20,tpy:=py+20,Dock_Number:=1,BLW:=3,TLW:=4,Dock_%Dock_Number%_X:=-810
- Gui,Loading_Progress:Show, w120 h20
- Loop 9
- {
- Gui,%BLW%:Destroy
- Gui,%TLW%:Destroy
- Gui,%BLW%:+Owner -Caption
- Gui,%TLW%:+Owner%BLW% -Caption +LastFound
- Winset,Transparent,1
- Gui,%BLW%:Color,Black
- WinGetPos,,Dock_It_Y,,,Dock It
- Gui,%BLW%:Show,x-810 y%Dock_It_Y% w810 h600
- Gui,%BLW%:Add,Progress,x0 y0 w900 h600 Background%THBC% c111111,100
- Gui,%BLW%:Font,c%TTTC% s8 Bold Q5,Khmer UI
- sy:=10,sy2:=11,sy3:=18
- Loop 12
- {
- sx:=160,sx2:=161
- Loop 5
- {
- Gui,%BLW%:Add,Progress,x%sx% y%sy% w110 h30 BackgroundBlack
- Gui,%BLW%:Add,Progress,x%sx% y%sy% w109 h29 Background%THBC%
- Gui,%BLW%:Add,Progress,x%sx2% y%sy2% w108 h28 Background222222
- if(i=1||i=61||i=121||i=181||i=241||i=301||i=361||i=421||i=481)
- Gui,%BLW%:Add,Text,x%sx2% y%sy3% w108 r1 BackgroundTrans Center,% Button_Name[i]
- else if(i=6||i=66||i=126||i=186||i=246||i=306||i=366||i=426||i=486)
- Gui,%BLW%:Add,Text,x%sx2% y%sy3% w108 r1 BackgroundTrans Center,% Button_Name[i]
- else
- Gui,%BLW%:Add,Text,x%sx2% y%sy3% w108 r1 BackgroundTrans Center vDBT_%i%,% Button_Name[i]
- Gui,%TLW%:Add,Text,x%sx% y%sy% w110 h30 Border vButton_%i% gRun_Program_Or_Edit
- sx+=130,sx2+=130,i++
- GuiControl,Loading_Progress:,Loading_Value,% i
- ;~ MouseGetPos,px,py
- ;~ tpx:=px+20,tpy:=py+20
- ;~ Gui,Loading_Progress:Show,x%tpx% y%tpy%
- }
- sy+=50,sy2+=50,sy3+=50
- }
- WinGetPos,,Dock_It_Y,,,Dock It
- Gui,%BLW%:Show,x-810 y%Dock_It_Y% w810 h600 ,Dock
- Gui,%TLW%:Show,x-810 y%Dock_It_Y% w810 h600 ,Dock
- Dock_Number++,BLW+=2,TLW+=2
- }
- Gui,Loading_Progress:Destroy
- return
- Update_New_Button_Info:
- InputBox,tie,Button Name,Enter A Name for this button
- Button_Name[cbs] :=tie
- sleep, 500
- InputBox,tie,Program path,Enter A program path
- Program_Name[cbs]:=tie
- GuiControl,%Win1%:,DBT_%cbs%,% Button_Name[cbs]
- tini:=Button_Name[cbs]
- IniWrite,%tini%,Dock-It Data.ini,Dock %Cur_Dock% Info,Button Name %cbs%
- sleep, 500
- tini:=Program_Name[cbs]
- IniWrite,%tini%,Dock-It Data.ini,Dock %Cur_Dock% Info,Button Program %cbs%
- msgbox, here
- return
- Name_Dock:
- InputBox,tie,Dock Name,Enter A Name for this Dock
- Dock_Names[Cur_Dock]:=tie
- IniWrite,%tie%,Dock-It Data.ini,Dock Names,Dock %Cur_Dock%
- GuiControl,1:,Button_%Cur_Dock%_4,% tie
- return
- *^+ESC::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement