Advertisement
CivReborn

div0.0.1

Nov 7th, 2017
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #SingleInstance,force
  2. CoordMode,Mouse,Screen
  3. SetWorkingDir,%A_ScriptDir%
  4. #NoEnv
  5.  
  6. IfNotExist Dock-It Data.ini
  7.     {
  8.         Loop 9
  9.             {
  10.                 IniWrite,UnNamed Dock %A_Index%,Dock-It Data.ini,Dock Names,Dock %A_Index%
  11.             }
  12.  
  13.         Prg:="Empty"
  14.         PRG_Notes:="Empty"
  15.         DI:=1
  16.         DCB:=1
  17.         Gui,Loading_Progress:Destroy
  18.         Gui,Loading_Progress:+AlwaysOnTop -Caption +Owner +Border
  19.         MouseGetPos,px,py
  20.         Gui,Loading_Progress:Color,Black
  21.         Gui,Loading_Progress:Add,Text,cWhite x5 y3 w70 ,Building Profile
  22.         Gui,Loading_Progress:Add,Progress,x+5 y5 w50 h10 BackgroundBlack cMaroon Range0-540 vLoading_Value Border,0
  23.         tpx:=px+20,tpy:=py+20
  24.         Gui,Loading_Progress:Show,x%tpx% y%tpy% w140 h20
  25.         Loop 9
  26.             {
  27.                 Loop 60
  28.                     {
  29.                         ;Button name
  30.                         if(DCB=1||DCB=61||DCB=121||DCB=181||DCB=241||DCB=301||DCB=361||DCB=421||DCB=481||DCB=541)
  31.                             IniWrite,Close,Dock-It Data.ini,Dock %DI% Info,Button Name %DCB%
  32.                         else if(DCB=6||DCB=66||DCB=126||DCB=186||DCB=246||DCB=306||DCB=366||DCB=426||DCB=486||DCB=546)
  33.                             IniWrite,Settings,Dock-It Data.ini,Dock %DI% Info,Button Name %DCB%
  34.                         else
  35.                             IniWrite,Unused Button %DCB%,Dock-It Data.ini,Dock %DI% Info,Button Name %DCB%
  36.                         IniWrite,%PRG%,Dock-It Data.ini,Dock %DI% Info,Button Program %DCB%
  37.                         IniWrite,%PRG_Notes%,Dock-It Data.ini,Dock %DI% Info,Button Notes %DCB%
  38.                         DCB++
  39.                         GuiControl,Loading_Progress:,Loading_Value,% DCB
  40.                         MouseGetPos,px,py
  41.                         tpx:=px+20,tpy:=py+20
  42.                         Gui,Loading_Progress:Show,x%tpx% y%tpy%
  43.                     }
  44.                 DI++   
  45.             }
  46.         Gui,Loading_Progress:Destroy
  47.         IniRead,test,Dock-It Data.ini,Dock 1 Info, Button Program 23
  48.     }
  49. global Dock_Names:=[]
  50. Loop 9
  51.     {
  52.         IniRead,temp,Dock-It Data.ini,Dock Names,Dock %A_Index%
  53.         Dock_Names[A_Index]:=temp
  54.     }
  55.  
  56. global Button_Name:=[]
  57. global Program_Name:=[]
  58. global Program_Notes:=[]
  59. DI:=1
  60. DCB:=1
  61. Gui,Loading_Progress:Destroy
  62. Gui,Loading_Progress:+AlwaysOnTop -Caption +Owner +Border
  63. Gui,Loading_Progress:Color,Black
  64. Gui,Loading_Progress:Add,Text,cWhite x5 y3 w70 ,Loading Profile
  65. Gui,Loading_Progress:Add,Progress,x+5 y5 w50 h10 BackgroundBlack cMaroon Range0-540 vLoading_Value Border,0
  66. Gui,Loading_Progress:Show, w140 h20
  67. Loop 9
  68.     {
  69.         Loop 60
  70.             {
  71.                 IniRead,tem1,Dock-It Data.ini,Dock %DI% Info,Button Name %DCB%
  72.                 IniRead,tem2,Dock-It Data.ini,Dock %DI% Info,Button Program %DCB%
  73.                 IniRead,tem3,Dock-It Data.ini,Dock %DI% Info,Button Notes %DCB%
  74.                 Button_Name[DCB] :=tem1
  75.                 Program_Name[DCB] :=tem2
  76.                 Program_Notes[DCB] :=tem3
  77.                 DCB++
  78.                 GuiControl,Loading_Progress:,Loading_Value,% DCB
  79.             }
  80.         DI++   
  81.     }
  82. Gui,Loading_Progress:Destroy
  83. Global Theme_Counter:=1,Y_Start_Pos:=(A_ScreenHeight//2)-300,Expanded_Window:=0,X_Start_Pos:=-137,X_Start_Pos2:=-137
  84. ,Theme_Color:=["Teal","Yellow","Maroon","Green","Red","Silver","Blue","White","Purple"]
  85. ,Lock_It:=0,THBC:=Theme_Color[2],TTTC:=Theme_Color[6],Dock_Open:=0,DBC:=11,i:=1
  86. Gui,1:+AlwaysOnTop -Caption Owner OwnDialogs +LastFound HwndHellbentHwnd
  87. Winset,TransColor,Lime
  88. Gui,2:+AlwaysOnTop -Caption Owner1 +LastFound
  89. Winset,Transparent,1
  90. Gui,1:Color,222222,Black
  91. Gui,2:Color,222222,Black
  92. Gui,1:Add,Progress,x130 y0 w20 h280 BackgroundLime
  93. Gui,1:Add,Progress,x130 y320 w20 h280 BackgroundLime
  94. Gui,1:Add,Progress,x137 y285 w10 h30 Background008844  vSlide_Lock
  95. Gui,1:Add,Progress,x0 y0 w130 h600 Background%THBC% c111111 ,100
  96. Gui,1:Add,Progress,x10 y7 w110 h25 Background%THBC% c111111 ,100
  97. Gui,1:Add,Progress,x20 y7 w90 h20 Background%THBC% c222222 ,100
  98. Gui,1:Font,c%TTTC% s14 Q5,Segoe UI black
  99. Gui,1:Add,Text,x20 y4 w90 Center BackgroundTrans,Dock-It
  100. Gui,1:Font,c%TTTC% s8 Bold Q5,Khmer UI
  101. BN:=1,BY1:=50,BY2:=51,BY3:=58
  102. Loop % DBC
  103.     {
  104.         Gui,1:Add,Progress,x10 y%BY1% w110 h30 BackgroundBlack vButton_%BN%_1
  105.         Gui,1:Add,Progress,x10 y%BY1% w109 h29 Background%THBC% vButton_%BN%_2
  106.         Gui,1:Add,Progress,x11 y%BY2% w108 h28 Background222222 vButton_%BN%_3
  107.         if(BN=10)
  108.             Gui,1:Add,Text,x11 y%BY3% w108 BackgroundTrans Center vButton_%BN%_4,Settings
  109.         else if(BN=11)
  110.             Gui,1:Add,Text,x11 y%BY3% w108 BackgroundTrans Center vButton_%BN%_4,EXIT
  111.         else
  112.             Gui,1:Add,Text,x11 y%BY3% w108 BackgroundTrans Center vButton_%BN%_4,% Dock_Names[BN]
  113.         BN++,BY1+=50,BY2+=50,BY3+=50
  114.     }
  115. BN:=1,BY:=50
  116. Loop % DBC
  117.     {
  118.         if(BN=11)
  119.             Gui,2:Add,Text,x10 y%BY% w110 h30 vDock_Button_%BN%  gGuiClose
  120.         else if(BN=10)
  121.             Gui,2:Add,Text,x10 y500 w110 h30 vDock_Button_%BN%
  122.         else   
  123.             Gui,2:Add,Text,x10 y%BY% w110 h30 vDock_Button_%BN%   gOpen_Dock
  124.         BN++,BY+=50
  125.     }
  126. Gui,1:Show,x-137 y%Y_Start_Pos% w150 h600,Dock It1
  127. Gui,2:Show,x-137 y%Y_Start_Pos% w130 h600,Dock It
  128. gosub,Build_Docks
  129. SetTimer,Watch_Window,10
  130. return
  131. GuiClose:
  132.     ExitApp
  133. 2GuiContextMenu:
  134. GuiContextMenu:
  135.     ;~ if(GetKeyState("ctrl")&&GetKeyState("Shift"))
  136.         ;~ {
  137.             ;~ msgbox, here
  138.         ;~ }
  139.     ;~ else
  140.         ;~ {
  141.             Lock_It:=!Lock_It
  142.             if(Lock_It)
  143.                 GuiControl,1:+BackgroundMaroon,Slide_Lock
  144.             else
  145.                 GuiControl,1:+Background008844,Slide_Lock
  146.         ;~ }
  147.     return
  148. Open_Dock:
  149.     if(GetKeyState("ctrl")&&GetKeyState("Shift"))
  150.         {
  151.             StringTrimLeft,Cur_Dock,A_GuiControl,12
  152.             gosub,Name_Dock
  153.         }
  154.     else if(Dock_Open=0)
  155.         {
  156.             StringTrimLeft,Cur_Dock,A_GuiControl,12
  157.             (Cur_Dock=1) ? (Win1:=3,Win2:=4) : (Cur_Dock=2) ? (Win1:=5,Win2:=6) : (Cur_Dock=3) ? (Win1:=7,Win2:=8)
  158.             : (Cur_Dock=4) ? (Win1:=9,Win2:=10) : (Cur_Dock=5) ? (Win1:=11,Win2:=12) : (Cur_Dock=6) ? (Win1:=13,Win2:=14)
  159.             : (Cur_Dock=7) ? (Win1:=15,Win2:=16) : (Cur_Dock=8) ? (Win1:=17,Win2:=18) : (Cur_Dock=9) ? (Win1:=19,Win2:=20) 
  160.             Dock_Open:=1,Dock_Expanded:=0
  161.         }
  162.     else if(Dock_Open=1&&Dock_Expanded=1)
  163.         {
  164.             Close_Dock=1
  165.             ;~ Dock_Open:=1,Dock_Expanded:=0
  166.         }      
  167.     return
  168. Run_Program_Or_Edit:
  169.     MouseGetPos,tmx,tmy,www,cw
  170.     GuiControlGet,tname,%Win2%:Name,%cw%
  171.     StringTrimLeft,cbs,tname,7
  172.     if(tname="Button_1"||tname="Button_61"||tname="Button_121"||tname="Button_181"||tname="Button_241"
  173.     ||tname="Button_301"||tname="Button_361"||tname="Button_421"||tname="Button_481")
  174.             Close_Dock:=1
  175.     else
  176.         Try{
  177.             Run, % Program_Name[cbs]
  178.         }Catch{
  179.             gosub,Update_New_Button_Info
  180.         }
  181.     return
  182. Watch_Window:
  183.     WingetPos,twx,twy,tww,twh,Dock It
  184.     MouseGetPos,tmx,tmy,www,cw
  185.     if(Expanded_Window=0&&tmx<=twx+tww+20&&Lock_It=0)
  186.         {
  187.             while X_Start_Pos<=-8
  188.                 {
  189.                     X_Start_Pos+=10,X_Start_Pos2+=10
  190.                     Gui,1:Show,x%X_Start_Pos% ,Dock It1
  191.                     Gui,2:Show,x%X_Start_Pos2% ,Dock It
  192.                 }
  193.             X_Start_Pos:=-3,X_Start_Pos2:=-3
  194.             Gui,1:Show,x%X_Start_Pos% ,Dock It1
  195.             Gui,2:Show,x%X_Start_Pos2% ,Dock It
  196.             Expanded_Window:=1
  197.         }
  198.     else if(Expanded_Window=1&&tmx>=twx+tww&&Dock_Open=0)
  199.         {
  200.             while X_Start_Pos>=-131
  201.                 {
  202.                     X_Start_Pos-=10,X_Start_Pos2-=10
  203.                     Gui,1:Show,x%X_Start_Pos% ,Dock It1
  204.                     Gui,2:Show,x%X_Start_Pos2% ,Dock It
  205.                 }
  206.             X_Start_Pos:=-136,X_Start_Pos2:=-136
  207.             Gui,1:Show,x%X_Start_Pos% ,Dock It1
  208.             Gui,2:Show,x%X_Start_Pos2%  ,Dock It
  209.             Expanded_Window:=0
  210.         }
  211.     if(Dock_Open=1&&Dock_Expanded=0)
  212.         {
  213.             DockX:=-810
  214.             while DockX <=-10
  215.                 {
  216.                     DockX+=30  
  217.                     Gui,%Win1%:Show,x%DockX% ,Dock
  218.                     Gui,%Win2%:Show,x%DockX% ,Dock
  219.                 }
  220.             DockX:=0,Dock_Expanded:=1
  221.             Gui,%Win1%:Show,x%DockX% ,Dock
  222.             Gui,%Win2%:Show,x%DockX% ,Dock
  223.         }
  224.     else if((Dock_Expanded=1&&tmx>810)||Close_Dock=1)  
  225.         {
  226.             while DockX >=-810
  227.                 {
  228.                     DockX-=30
  229.                     Gui,%Win1%:Show,x%DockX% ,Dock
  230.                     Gui,%Win2%:Show,x%DockX% ,Dock
  231.                 }
  232.             DockX:=-810,Dock_Expanded:=0,Dock_Open:=0,Close_Dock:=0
  233.             Gui,%Win1%:Show,x%DockX% ,Dock
  234.             Gui,%Win2%:Show,x%DockX% ,Dock
  235.         }  
  236. return
  237. Build_Docks:
  238.     Gui,Loading_Progress:Destroy
  239.     Gui,Loading_Progress:+AlwaysOnTop -Caption +Owner +Border
  240.     Gui,Loading_Progress:Color,Black
  241.     Gui,Loading_Progress:Add,Text,cWhite x5 y3 w50 ,LOADING...
  242.     Gui,Loading_Progress:Add,Progress,x+5 y5 w50 h10 BackgroundBlack cMaroon Range0-540 vLoading_Value Border,0
  243.     tpx:=px+20,tpy:=py+20,Dock_Number:=1,BLW:=3,TLW:=4,Dock_%Dock_Number%_X:=-810
  244.     Gui,Loading_Progress:Show, w120 h20
  245.     Loop 9
  246.         {
  247.             Gui,%BLW%:Destroy
  248.             Gui,%TLW%:Destroy
  249.             Gui,%BLW%:+Owner -Caption
  250.             Gui,%TLW%:+Owner%BLW% -Caption +LastFound
  251.             Winset,Transparent,1
  252.             Gui,%BLW%:Color,Black
  253.             WinGetPos,,Dock_It_Y,,,Dock It
  254.             Gui,%BLW%:Show,x-810 y%Dock_It_Y% w810 h600
  255.             Gui,%BLW%:Add,Progress,x0 y0 w900 h600 Background%THBC% c111111,100
  256.             Gui,%BLW%:Font,c%TTTC% s8 Bold Q5,Khmer UI
  257.             sy:=10,sy2:=11,sy3:=18
  258.             Loop 12
  259.                 {
  260.                     sx:=160,sx2:=161
  261.                     Loop 5
  262.                         {
  263.                             Gui,%BLW%:Add,Progress,x%sx% y%sy% w110 h30 BackgroundBlack
  264.                             Gui,%BLW%:Add,Progress,x%sx% y%sy% w109 h29 Background%THBC%
  265.                             Gui,%BLW%:Add,Progress,x%sx2% y%sy2% w108 h28 Background222222
  266.                             if(i=1||i=61||i=121||i=181||i=241||i=301||i=361||i=421||i=481)
  267.                                 Gui,%BLW%:Add,Text,x%sx2% y%sy3% w108 r1 BackgroundTrans Center,% Button_Name[i]
  268.                             else if(i=6||i=66||i=126||i=186||i=246||i=306||i=366||i=426||i=486)
  269.                                 Gui,%BLW%:Add,Text,x%sx2% y%sy3% w108 r1 BackgroundTrans Center,% Button_Name[i]
  270.                             else
  271.                                 Gui,%BLW%:Add,Text,x%sx2% y%sy3% w108 r1 BackgroundTrans Center vDBT_%i%,% Button_Name[i]  
  272.                             Gui,%TLW%:Add,Text,x%sx% y%sy% w110 h30 Border vButton_%i% gRun_Program_Or_Edit
  273.                             sx+=130,sx2+=130,i++
  274.                             GuiControl,Loading_Progress:,Loading_Value,% i
  275.                             ;~ MouseGetPos,px,py
  276.                             ;~ tpx:=px+20,tpy:=py+20
  277.                             ;~ Gui,Loading_Progress:Show,x%tpx% y%tpy%
  278.                         }
  279.                     sy+=50,sy2+=50,sy3+=50 
  280.                 }
  281.             WinGetPos,,Dock_It_Y,,,Dock It
  282.             Gui,%BLW%:Show,x-810 y%Dock_It_Y% w810 h600 ,Dock
  283.             Gui,%TLW%:Show,x-810 y%Dock_It_Y% w810 h600 ,Dock
  284.             Dock_Number++,BLW+=2,TLW+=2
  285.         }
  286.     Gui,Loading_Progress:Destroy
  287.     return
  288. Update_New_Button_Info:
  289.     InputBox,tie,Button Name,Enter A Name for this button
  290.     Button_Name[cbs] :=tie
  291.     sleep, 500
  292.     InputBox,tie,Program path,Enter A program path
  293.     Program_Name[cbs]:=tie
  294.     GuiControl,%Win1%:,DBT_%cbs%,% Button_Name[cbs]
  295.     tini:=Button_Name[cbs]
  296.     IniWrite,%tini%,Dock-It Data.ini,Dock %Cur_Dock% Info,Button Name %cbs%
  297.     sleep, 500
  298.     tini:=Program_Name[cbs]
  299.     IniWrite,%tini%,Dock-It Data.ini,Dock %Cur_Dock% Info,Button Program %cbs%
  300.     msgbox, here
  301.     return
  302. Name_Dock:
  303.     InputBox,tie,Dock Name,Enter A Name for this Dock
  304.     Dock_Names[Cur_Dock]:=tie
  305.     IniWrite,%tie%,Dock-It Data.ini,Dock Names,Dock %Cur_Dock%
  306.     GuiControl,1:,Button_%Cur_Dock%_4,% tie
  307.     return
  308. *^+ESC::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement