Advertisement
CivReborn

Auto Object Script - dbl space update

Nov 25th, 2017
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #SingleInstance,Force
  2. CoordMode,Mouse,Screen
  3. Global Key_Input,Auto_Key_Amount:=5
  4. Gui,1:+AlwaysOnTop +LastFound
  5. Gui,1:Color,Teal,Black
  6. Gui,1:Font,cBlack s8 Bold Q5,Segoe UI
  7. Gui,1:Add,Edit,cBlack x10 y10 w800 r3 ReadOnly vOutput_Edit ,% Output_String
  8. Gui,1:Add,Groupbox,x10 y+5 w800 h100 Section ,Settings / ETC
  9. Gui,1:Add,ListBox,cWhite xs+10 ys+25 w120 r4 AltSubmit vOutType gDisplay_Output,Object||Object w/Strings|Array|Array w/Strings|Pipe List
  10. Gui,1:Add,Text,cLime x+10 ys+25 w30 ,Name:
  11. Gui,1:Add,Edit,cWhite x+10 yp-2 w100 r1 vName gDisplay_Output,
  12. Gui,1:Add,CheckBox,xs+140 y+20 vALT_Delimiter gDisplay_Output,Double Space Delimiter
  13. Gui,1:Add,Groupbox,xs+300 ys+10 w125 h80 Section
  14. Gui,1:Add,CheckBox,xs+10 ys+20 vAuto_Keys gDisplay_Output,Auto Keys
  15. Gui,1:Add,Text,cLime xs+10 y+15,Amount:
  16. Gui,1:Add,Edit,cRed x+10 yp-2 w50 r1 vAuto_Key_Amount gDisplay_Output,% Auto_Key_Amount
  17. Gui,1:Add,CheckBox,x+30 ys+10 vTimer gTurn_On_Off_Timer,Turn On Transparency
  18. Gui,1:Add,Button,xs+390 ys+60 w100 r1 -Theme gClip_All,Clipboard
  19. Gui,1:Add,GroupBox,x10 y+15 w800 h80 Section ,Input
  20. Gui,1:Add,Text,cLime xs+10 ys+20 w35 ,Keys:
  21. Gui,1:Add,Edit,cWhite x+10 ys+18 w740 r1 vKey_Input gDisplay_Output
  22. Gui,1:Add,Text,cLime xs+10 y+10 w35 ,Value:
  23. Gui,1:Add,Edit,cWhite x+10 yp-2 w740 r1 vValue_Input gDisplay_Output
  24. Gui,1:Submit,NoHide
  25. Gui,1:Show,x540 y0 w820 h265, Auto Object 1
  26. return
  27. Turn_On_Off_Timer:
  28.     Timer:=!Timer
  29.     if(Timer)
  30.         SetTimer,I_Want_To_See,100
  31.     else    {
  32.         SetTimer,I_Want_To_See,-1
  33.     }
  34.     return
  35. I_Want_To_See:
  36.     mouseGetPos,x1,y1
  37.     WinGetPos,x2,y2,w2,h2,Auto Object 1
  38.     if(x1>=x2&&x1<=x2+w2&&y1>=y2&&y1<=y2+h2)
  39.         Winset,Transparent,255,Auto Object 1
  40.     else
  41.         winset,Transparent,20,Auto Object 1
  42.     return
  43. GuiClose:
  44. GuiEscape:
  45.     ExitApp
  46. Display_Output:
  47.     Gui,1:Submit,NoHide
  48.     GuiControl,1:Enable,Key_Input
  49.     (ALT_Delimiter)?(Delimit:="  "):(Delimit:=" ")
  50.     Quote = `"
  51.     temp_Key:="",temp_Key:=[],temp_Value:="",temp_Value:=[]
  52.     (OutType=1)?(S1:=Name ":= {",S2:=":",S3:=",",S4:=":",S5:="}" Run_Output(S1,S2,S3,S4,S5,"","1","0","0"))
  53.     :(OutType=2)?(S1:=Name ":= {",S2:=":",S3:=",",S4:=":",S5:="}" Run_Output(S1,S2,S3,S4,S5,Quote,"1","0","0"))
  54.     :(OutType=3)?(S1:=Name ":= [",S2:=",",S3:="]",S4:="",S5:="" Run_Output(S1,S2,S3,S4,S5,"","0","1","0"))
  55.     :(OutType=4)?(S1:=Name ":= [",S2:=",",S3:="]",S4:="",S5:="" Run_Output(S1,S2,S3,S4,S5,Quote,"0","1","0"))
  56.     :(OutType=5)?(S1:=Name ":= " Quote,S2:="|",S3:=Quote,S4:="",S5:="" Run_Output(S1,S2,S3,S4,S5,Quote,"0","1","1"))
  57.     return
  58.  
  59. Clip_All:
  60.     sleep,20
  61.     Clipboard:=Output_Edit
  62.     return
  63. GuiContextMenu:
  64.     Gui,1:Minimize
  65.     return
  66. Run_Output(S1,S2,S3,S4,S5,EQ,FULL,DisableIt,Organ){
  67.     global
  68.     Output_Edit:=""
  69.     if(DisableIt=1)
  70.         GuiControl,1:Disable,Key_Input
  71.     if(Full=1){
  72.         if(Auto_Keys=0){
  73.             Loop,Parse,Key_Input,% Delimit
  74.                 temp_Key[A_Index]:=A_LoopField
  75.         }else   {
  76.             GuiControl,1:Disable,Key_Input
  77.             Loop,% Auto_Key_Amount
  78.                 temp_Key[A_Index]:= A_Index
  79.         }
  80.     }
  81.     Split_Array:=strsplit(Value_Input, Delimit)
  82.     if(Organ=0){
  83.         for,k,v in Split_Array
  84.             temp_Value[k]:=EQ v EQ
  85.     }
  86.     else    {
  87.         for,k,v in Split_Array
  88.             temp_Value[k]:=v S2
  89.     }
  90.     Output_Edit.= S1
  91.     (temp_Value.MaxIndex()>temp_Key.MaxIndex())?(Loop_Amount:=temp_Value.MaxIndex()):(Loop_Amount:=temp_Key.MaxIndex())
  92.     Loop % Loop_Amount  {
  93.         if(Full=1){
  94.             if(A_Index!=temp_Value.MaxIndex())
  95.                 Output_Edit.=temp_Key[A_Index] S2 temp_Value[A_Index] S3
  96.             else
  97.                 Output_Edit.=temp_Key[A_Index] S4 temp_Value[A_Index] S5
  98.         }else   {
  99.             if(Organ=0){
  100.                 if(A_Index!=temp_Value.MaxIndex())
  101.                     Output_Edit.=temp_Value[A_Index] S2
  102.                 else
  103.                     Output_Edit.= temp_Value[A_Index] S3
  104.             }else   {
  105.                 if(A_Index!=temp_Value.MaxIndex())
  106.                     Output_Edit.=temp_Value[A_Index]
  107.                 else
  108.                     Output_Edit.= temp_Value[A_Index] S3
  109.             }  
  110.         }
  111.     }
  112.     GuiControl,1:,Output_Edit,% Output_Edit
  113. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement