Advertisement
CivReborn

Auto Objects v1.4

Nov 26th, 2017
541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Old pastes ;PasteBin Save: https://pastebin.com/4vJ9MhYT ;Version 1.2
  2. ;Version 1.4 Paste: https://pastebin.com/nD3JQ0G1 ;Nov 26th, 2017
  3. #SingleInstance,Force
  4. CoordMode,Mouse,Screen
  5. Global Key_Input,Auto_Key_Amount:=5,Ax:=600,Ay:=200
  6. Gui,1:+AlwaysOnTop +LastFound
  7. Gui,1:Color,Teal,Black
  8. Gui,1:Font,cBlack s8 Bold Q5,Segoe UI
  9. Null_Var:="",Control_Types:= ["Edit","Groupbox","ListBox","Text","Edit","CheckBox","CheckBox","Groupbox","CheckBox","Text","Edit","CheckBox","Button","GroupBox","Text","Edit","Text","Edit"],Control_Text := [Output_String,"Settings / ETC","Object||Object w/Strings|Array|Array w/Strings|Pipe List","Name:",Null_Var,"Double Space Delimiter","Auto Clip Add",Null_Var,"Auto Keys","Amount:",Auto_Key_Amount,"Turn On Transparency","Clipboard","Input","Keys:",Null_Var,"Value:",Null_Var]
  10. For, k, v in ["cBlack x10 y10 w1180 r3 ReadOnly vOutput_Edit","x10 y+5 w800 h100 Section","cWhite xs+10 ys+25 w120 r4 AltSubmit vOutType gDisplay_Output","cLime x+10 ys+25 w30","cWhite x+10 yp-2 w100 r1 vName gDisplay_Output","xs+140 y+10 vALT_Delimiter gDisplay_Output","xs+140 y+10 vAuto_Clip_Add gAuto_Clip","xs+300 ys+10 w125 h80 Section","xs+10 ys+20 vAuto_Keys gDisplay_Output","cLime xs+10 y+15","cRed x+10 yp-2 w50 r1 vAuto_Key_Amount gDisplay_Output","x+30 ys+10 vTimer gTurn_On_Off_Timer","xs+390 ys+60 w100 r1 -Theme gClip_All","x10 y+15 w1180 h130 Section","cLime xs+10 ys+20 w35","cWhite x+10 ys+18 w1120 r2 vKey_Input gDisplay_Output","cLime xs+10 y+10 w35","cWhite x+10 yp-2 w1120 r4 vValue_Input gDisplay_Output"]
  11.     Gui,1:Add,% Control_Types[A_Index],% v ,% Control_Text[A_Index]
  12. Gui,1:Submit,NoHide
  13. Gui,1:Show,w1200 h305, Auto Objects v1.4
  14. return
  15. Auto_Clip:
  16.     Gui,1:Submit,Nohide
  17.     return
  18. Turn_On_Off_Timer:
  19.     Timer:=!Timer
  20.     if(Timer)
  21.         SetTimer,I_Want_To_See,100
  22.     else    {
  23.         SetTimer,I_Want_To_See,-1
  24.     }
  25.     return
  26. I_Want_To_See:
  27.     mouseGetPos,x1,y1
  28.     WinGetPos,x2,y2,w2,h2,Auto Objects v1.4
  29.     if(x1>=x2&&x1<=x2+w2&&y1>=y2&&y1<=y2+h2)
  30.         Winset,Transparent,255,Auto Objects v1.4
  31.     else
  32.         winset,Transparent,20,Auto Objects v1.4
  33.     return
  34. GuiClose:
  35.     ExitApp
  36. Display_Output:
  37.     Gui,1:Submit,NoHide
  38.     GuiControl,1:Enable,Key_Input
  39.     (ALT_Delimiter)?(Delimit:="  "):(Delimit:=" ")
  40.     Quote = `"
  41.     temp_Key:="",temp_Key:=[],temp_Value:="",temp_Value:=[]
  42.     (OutType=1)?(S1:=Name ":= {",S2:=":",S3:=",",S4:=":",S5:="}" Run_Output(S1,S2,S3,S4,S5,"","1","0","0"))
  43.     :(OutType=2)?(S1:=Name ":= {",S2:=":",S3:=",",S4:=":",S5:="}" Run_Output(S1,S2,S3,S4,S5,Quote,"1","0","0"))
  44.     :(OutType=3)?(S1:=Name ":= [",S2:=",",S3:="]",S4:="",S5:="" Run_Output(S1,S2,S3,S4,S5,"","0","1","0"))
  45.     :(OutType=4)?(S1:=Name ":= [",S2:=",",S3:="]",S4:="",S5:="" Run_Output(S1,S2,S3,S4,S5,Quote,"0","1","0"))
  46.     :(OutType=5)?(S1:=Name ":= " Quote,S2:="|",S3:=Quote,S4:="",S5:="" Run_Output(S1,S2,S3,S4,S5,Quote,"0","1","1"))
  47.     return
  48. Clip_All:
  49.     sleep,20
  50.     Clipboard:=Output_Edit
  51.     return
  52. Move_Tab:
  53.     PostMessage,0xA1,2
  54.     While(GetKeyState("LButton"))
  55.         Sleep, 10
  56.     WinGetPos,Ax,Ay,,,AUTO TAB v1.4
  57.     return
  58. 2GuiContextMenu:
  59.     Gui,2:Destroy
  60.     Gui,1:Show
  61.     return 
  62. GuiContextMenu:
  63.     Gui,1:Minimize
  64.     Gui,2:Destroy
  65.     Gui,2:+AlwaysOnTop -Caption +Border +Owner1
  66.     Gui,2:Color,Gray
  67.     Gui,2:Font,cWhite s7 Bold Q5,Segoe UI
  68.     Gui,2:Add,Text,x0 y5 w50 h20 Center gMove_Tab,AUTO OBJ
  69.     Gui,2:Show,x%Ax% y%Ay% w50 h20,AUTO TAB v1.4
  70.     return
  71. Run_Output(S1,S2,S3,S4,S5,EQ,FULL,DisableIt,Organ){
  72.     global
  73.     Output_Edit:=""
  74.     if(DisableIt=1)
  75.         GuiControl,1:Disable,Key_Input
  76.     if(Full=1){
  77.         if(Auto_Keys=0){
  78.             Loop,Parse,Key_Input,% Delimit
  79.                 temp_Key[A_Index]:=A_LoopField
  80.         }else   {
  81.             GuiControl,1:Disable,Key_Input
  82.             Loop,% Auto_Key_Amount
  83.                 temp_Key[A_Index]:= A_Index
  84.         }
  85.     }
  86.     Split_Array:=strsplit(Value_Input, Delimit)
  87.     if(Organ=0){
  88.         for,k,v in Split_Array
  89.             temp_Value[k]:=EQ v EQ
  90.     }
  91.     else    {
  92.         for,k,v in Split_Array
  93.             temp_Value[k]:=v S2
  94.     }
  95.     Output_Edit.= S1
  96.     (temp_Value.MaxIndex()>temp_Key.MaxIndex())?(Loop_Amount:=temp_Value.MaxIndex()):(Loop_Amount:=temp_Key.MaxIndex())
  97.     Loop % Loop_Amount  {
  98.         if(Full=1){
  99.             if(A_Index!=temp_Value.MaxIndex())
  100.                 Output_Edit.=temp_Key[A_Index] S2 temp_Value[A_Index] S3
  101.             else
  102.                 Output_Edit.=temp_Key[A_Index] S4 temp_Value[A_Index] S5
  103.         }else   {
  104.             if(Organ=0){
  105.                 if(A_Index!=temp_Value.MaxIndex())
  106.                     Output_Edit.=temp_Value[A_Index] S2
  107.                 else
  108.                     Output_Edit.= temp_Value[A_Index] S3
  109.             }else   {
  110.                 if(A_Index!=temp_Value.MaxIndex())
  111.                     Output_Edit.=temp_Value[A_Index]
  112.                 else
  113.                     Output_Edit.= temp_Value[A_Index] S3
  114.             }  
  115.         }
  116.     }
  117.     GuiControl,1:,Output_Edit,% Output_Edit
  118. }
  119. ~^C::
  120.     sleep,50
  121.     if(Auto_Clip_Add=1&&ALT_Delimiter=1){
  122.         Value_Input.= Clipboard "  "
  123.         GuiControl,1:,Value_Input,% Value_Input
  124.         gosub,Display_Output
  125.     }
  126.     else if(Auto_Clip_Add=1&&ALT_Delimiter=0){
  127.         Value_Input.= Clipboard " "
  128.         GuiControl,1:,Value_Input,% Value_Input
  129.         gosub,Display_Output
  130.     }
  131.     return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement