Toys0125

Auto Open OBS and Restream.

Dec 11th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. !Delete::
  2. IfWinExist, OBS
  3. Goto, Launch1
  4. Else {
  5. Goto, Launch0
  6. }
  7. Launch0:
  8. Run, E:\Program Files (x86)\obs-studio\bin\64bit\obs64.exe , E:\Program Files (x86)\obs-studio\bin\64bit\
  9. Loop1:
  10. IfWinExist, OBS
  11. return
  12. Else {
  13. Sleep, 500
  14. Gosub, Loop1
  15. }
  16.  
  17. WinActivate, OBS
  18. WinMove, OBS, , 2216,169
  19.  
  20. Launch1:
  21. IfWinExist, Chat
  22. Exit
  23. Launch2:
  24. Run, C:\Users\Toys0125\Desktop\Restream Chat.appref-ms
  25. Loop2:
  26. IfWinExist, Chat
  27. return
  28. Else {
  29. Sleep, 500
  30. Gosub, Loop2
  31. }
  32. WinMove, Chat , ,2215,613
  33. Sleep, 2000
  34. WinActivate, Chat
  35. SendInput, This is AutoHotkey Opening of OBS and Restream chat test. This is for the auto-hide feature to work. See my Pastebin of AHK script http://pastebin.com/7f70AWRG. Get AHK Here:https://autohotkey.com/
  36. Send, {Enter}
  37. Exit
  38.  
  39. !Ins::
  40. Intro:
  41. WinGetActiveTitle, activeVara
  42. WinGet , processVara , ProcessName , A
  43. WinActivate, OBS
  44. Send,!{Numpad4}
  45. Sleep, 8500
  46. Send !{Numpad5}
  47. Sleep, 700
  48. if processVara = obs64.exe
  49. {
  50. Return
  51. }
  52. else{
  53. WinActivate, %activeVara%
  54. }
  55. Return
  56.  
  57. !Home::
  58. Away:
  59. WinGetActiveTitle, activeVarb
  60. WinGet , processVarb , ProcessName , A
  61. WinActivate, OBS
  62. Sleep, 1000
  63. Send, !{Numpad6}
  64. Sleep, 700
  65. if processVarb = obs64.exe
  66. {
  67. Return
  68. }
  69. else{
  70. WinActivate, %activeVarb%
  71. }
  72. Return
  73.  
  74. !End::
  75. BackAgain:
  76. WinGetActiveTitle, activeVarc
  77. WinGet,processVarc, ProcessName , A
  78. WinActivate, OBS
  79. Sleep, 1000
  80. Send, !{Numpad5}
  81. Sleep, 700
  82. if processVarc = obs64.exe
  83. {
  84. Return
  85. }
  86. else{
  87. WinActivate, %activeVarc%
  88. }
  89. Return
Add Comment
Please, Sign In to add comment