Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. // REMEMBER TO SOURCE THIS, NOT RUN IN THE SCRIPT EDITOR DIRECTLY
  2. {
  3. proc string GetTestString () {
  4. return "TEST_STRING_#";
  5. }
  6.  
  7. proc RunLocal1 () {
  8. print(GetTestString());
  9. }
  10.  
  11. proc RunLocal2 (string $Input) {
  12. print($Input);
  13. }
  14.  
  15. proc RunLocal3 () {
  16. RunLocal2(GetTestString());
  17. }
  18.  
  19. global proc RunGlobal () {
  20. // works
  21. print (GetTestString());
  22.  
  23. // works
  24. RunLocal1();
  25.  
  26. // works
  27. RunLocal2(GetTestString());
  28.  
  29. // works
  30. RunLocal3();
  31. }
  32.  
  33. global proc CreateWindow () {
  34. if (`window -exists "TestWindow"`) {
  35. deleteUI "TestWindow";
  36. }
  37.  
  38. window
  39. -title "Test"
  40. -sizeable 0
  41. -maximizeButton 0
  42. -widthHeight 200 100
  43. "TestWindow";
  44.  
  45. string $TestButtons = `frameLayout
  46. -collapsable 0
  47. -labelVisible 0
  48. "TestButtons"`;
  49.  
  50. rowColumnLayout -numberOfRows 1;
  51.  
  52. button
  53. -label "Quick Test"
  54. -command "RunGlobal";
  55.  
  56. showWindow "TestWindow";
  57. }
  58.  
  59. CreateWindow();
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement