BrandonSpendlove

KONTAKT - Purging Groups - Easy Example

Apr 26th, 2014
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. {This simple example script will show how to load samples from 5 groups, and deactivate them!}
  2. {NOTE: Make sure you create 5 groups, and add samples in all 5 to test this example...}
  3.  
  4. on init
  5.  
  6. message("")
  7. set_script_title("Purging Groups")
  8.  
  9. make_perfview
  10. set_ui_height(3)
  11.  
  12. declare ui_button $group1
  13. declare ui_button $group2
  14. declare ui_button $group3
  15. declare ui_button $group4
  16. declare ui_button $group5
  17.  
  18. move_control($group1, 1,1)
  19. move_control($group2, 2,1)
  20. move_control($group3, 3,1)
  21. move_control($group4, 4,1)
  22. move_control($group5, 5,1)
  23.  
  24. set_text($group1,"Group 1")
  25. set_text($group2,"Group 2")
  26. set_text($group3,"Group 3")
  27. set_text($group4,"Group 4")
  28. set_text($group5,"Group 5")
  29.  
  30. end on
  31.  
  32. on ui_control ($group1)
  33.  
  34. if ($group1 = 1)
  35.  
  36. purge_group(0, 0)
  37.  
  38. else
  39.  
  40. purge_group(0,1)
  41.  
  42. end if
  43.  
  44. end on
  45.  
  46. on ui_control ($group2)
  47.  
  48. if ($group2 = 1)
  49.  
  50. purge_group(1, 0)
  51.  
  52. else
  53.  
  54. purge_group(1,1)
  55.  
  56. end if
  57.  
  58. end on
  59.  
  60. on ui_control ($group3)
  61.  
  62. if ($group3 = 1)
  63.  
  64. purge_group(2, 0)
  65.  
  66. else
  67.  
  68. purge_group(2,1)
  69.  
  70. end if
  71.  
  72. end on
  73.  
  74. on ui_control ($group4)
  75.  
  76. if ($group4 = 1)
  77.  
  78. purge_group(3, 0)
  79.  
  80. else
  81.  
  82. purge_group(3,1)
  83.  
  84. end if
  85.  
  86. end on
  87.  
  88. on ui_control ($group5)
  89.  
  90. if ($group5 = 1)
  91.  
  92. purge_group(4, 0)
  93.  
  94. else
  95.  
  96. purge_group(4,1)
  97.  
  98. end if
  99.  
  100. end on
Advertisement
Add Comment
Please, Sign In to add comment