vanheartnet

Youtube Auto Watch v2.3

Apr 16th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.48 KB | None | 0 0
  1. ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
  2. ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
  3. ;@Ahk2Exe-Set FileDescription, Youtube Automatic Views
  4. ;@Ahk2Exe-Set FileVersion, 2.0.0.0
  5. ;@Ahk2Exe-SetInternalName Youtube Unlimited Views
  6. ;@Ahk2Exe-SetName Youtube Unlimited Views
  7. ;@Ahk2Exe-SetOrigFileName Youtube Automatic Views
  8. ;@Ahk2Exe-Set ProductName, Youtube Unlimited Views
  9. ;@Ahk2Exe-Set ProductVersion, 2.0.0.0
  10. ;@Ahk2Exe-Set Description, Youtube Automatic Views
  11. ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
  12.  
  13.  
  14.  
  15.  
  16. #SingleInstance, Force
  17. #NoEnv
  18. #Persistent
  19. SetBatchLines, 100ms
  20. SetWorkingDir, %A_ScriptDir%
  21. SetTitleMatchMode,1
  22.  
  23.  
  24. Pause:=true
  25.  
  26. BProcess:="chrome.exe"
  27. Browsername := "Chrome||Brave|Internet Explorer|FireFox|"
  28. Browser:=["chrome.exe", "brave.exe", "iexplore.exe", "firefox.exe"]
  29. Process,close,% BProcess
  30. FileInstall,BannerSamp.png,%A_temp%\BannerSamp.png
  31. FileInstall,Banner2.png,%A_temp%\Banner2.png
  32. FileInstall,Banner3.png,%A_temp%\Banner3.png
  33. FileInstall,YTSubs1.png,%A_temp%\YTSubs1.png
  34. IfNotExist,VANHEARTNET
  35. {
  36. FileCreateDir,VANHEARTNET
  37. FileSetAttrib,+RH,VANHEARTNET
  38. }
  39. IfNotExist,VANHEARTNET\Settings.ini
  40. {
  41. IniWrite,https://www.youtube.com/watch?v=Coodor-yxv4&t=234s,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Video
  42. IniWrite,Roblox Portable by VANHEARTNET,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Window
  43. IniWrite,10000,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Secs
  44. Iniwrite,1,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,RSingle
  45. Iniwrite,0,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,RMultiple
  46. Iniwrite,0,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Tab
  47. }
  48. IfNotExist,VANHEARTNET\list.txt
  49. FileAppend,https://www.youtube.com/watch?v=Coodor-yxv4,VANHEARTNET\list.txt:VAN:$DATA
  50. Iniread,Video1,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Video
  51. IniRead,Window1,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Window
  52. IniRead,Secs,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Secs
  53. IniRead,RSingle,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,RSingle
  54. IniRead,RMultiple,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,RMultiple
  55. IniRead,Tab1,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Tab
  56. FileRead,Links,VANHEARTNET\list.txt:VAN:$DATA
  57. if(RSingle="ERROR")
  58. Iniwrite,1,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,RSingle
  59. if (RMultiple="ERROR")
  60. Iniwrite,1,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,RMultiple
  61. if(Links="ERROR")
  62. FileAppend,https://www.youtube.com/watch?v=Coodor-yxv4,VANHEARTNET\list.txt:VAN:$DATA
  63. Sec:=(Secs//1000)
  64. if (Tab1="ERROR")
  65. {
  66. Iniwrite,0,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Tab
  67. Tab1:=0
  68. }
  69.  
  70.  
  71. Gui,1:Submit,Nohide
  72. BG:=[1 "333333", 2 "222222",3 "cWhite", 4 "100", 5 "BackgroundWhite"]
  73. ;~ Gui,1:+Alwaysontop
  74. Gui,1:Color,% BG.1,
  75. Gui,1:Add,Picture,x20 y10 BackgroundTrans, %A_temp%\BannerSamp.png
  76. Gui,1:Add,Groupbox,x10 y132 w610 h305,
  77. Gui,1:Add,Picture,x20 y145 w100 h90 BackgroundTrans, %A_temp%\Banner2.png
  78. Gui,1:Add,Picture,x200 y380 w200 h50 BackgroundTrans gSubs, %A_temp%\YTSubs1.png
  79. Gui,1:Font, s40 cWhite, Impact
  80. Gui,1:Add,Text, x140 y150 BackgroundTrans,AUTOMATIC VIEWS
  81. Gui,1:Font, s39 cRed, Impact
  82. Gui,1:Add,Text, x144 y149 BackgroundTrans,AUTOMATIC VIEWS
  83.  
  84. Gui,1:Font,
  85. Gui,1:Font,cWhite
  86.  
  87.  
  88. Gui,1:Add,Text,x450 y410, Powered by :
  89. Gui,1:Font,
  90. Gui,1:Font,s10,Arial Black
  91. Gui,1:Add,Text,x210 y247 c00ffff, VIP
  92. Gui,1:Font,s12
  93. Gui,1:Add,Button,x440 y300 w100 h70 vButton1 gButton1,CHANGE
  94. Gui,1:Add,Button,x440 y300 w100 h70 vButton2 gButton2 Hidden,SAVE
  95. Gui,1:Font,
  96. Gui,1:Font,cRed
  97. Gui,1:Add,Text,x520 y410, VANHEARTNET
  98. Gui,1:Font,
  99. Gui,1:Add,Edit,x20 y300 w400 h25 vEdit1 Disabled,% Video1
  100. Gui,1:Add,Edit,x20 y350 w400 h25 vEdit2 Disabled,% Window1
  101. Gui,1:Add,Edit,x20 y400 w50 Center Number h25 vEdit3 Disabled,% Sec
  102. Gui,1:Add,Edit,x20 y300 Hidden w400 r5 vEdit4 Disabled,% Links
  103. Gui,1:Font, S10 cYellow
  104. Gui,1:Add,Text,x25 y275 vYTLink, Youtube Link :
  105. Gui,1:Add,Text,x25 y330 vYTTitle, Youtube Title :
  106. Gui,1:Add,Text,x25 y380, Check Every %Sec% Seconds :
  107. Gui,1:Font,
  108. Gui,1:Font,cWhite
  109.  
  110. Gui,1:Add,Dropdownlist,x400 y245 w150 vDPL gDPL Altsubmit Control Choose1 ,% Browsername
  111.  
  112. ;~ ####################### RADIO #############################
  113.  
  114. if (RSingle=1)
  115. {
  116. Gui,1:Add,Radio,x20 y250 vSingle Checked gSingle,Single Video
  117. Gui,1:Add,Radio,x120 y250 vMultiple gMultiple,Multiple Video
  118. Gui,1:Add,Checkbox,x290 y250 vTab gTab Hidden,Multi-Tabs
  119. Multiple:=False
  120. }
  121. else if (RMultiple=1)
  122. {
  123. Gui,1:Add,Radio,x20 y250 vSingle gSingle,Single Video
  124. Gui,1:Add,Radio,x120 y250 vMultiple Checked gMultiple,Multiple Video
  125. Gui,1:Add,Checkbox,x290 y250 vTab gTab,Multi-Tabs
  126. Guicontrol,1:Hide,Edit1
  127. Guicontrol,1:Hide,Edit2
  128. Guicontrol,1:Hide,YTTitle
  129. Guicontrol,1:Show,Edit4
  130. Multiple:=True
  131.  
  132. }
  133. Gui,1:Font,s10 Bold
  134. Gui,1:Add,Text,x410 y225 BackgroundTrans , Browser
  135. ;~ #######################################################################
  136.  
  137.  
  138. Gui,1:Show, w630 h450, Youtube Unlimited Views
  139. if(RSingle=1)
  140. SetTimer,YTube,% Secs
  141. else
  142. {
  143. if(Tab1=1)
  144. {
  145. SetTimer,CheckTab,% Secs
  146. GuiControl,1:,Tab,1
  147.  
  148. }
  149. else
  150. {
  151. SetTimer,YTube2,% Secs
  152. }
  153. }
  154.  
  155. return
  156.  
  157.  
  158. Tab:
  159. Gui,1:Submit,Nohide
  160. if(Tab=1)
  161. {
  162. Iniwrite,1,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Tab
  163. SetTimer,YTube,Off
  164. SetTimer,YTube2,Off
  165. SetTimer,CheckTab,% Secs
  166. }
  167. else
  168. {
  169. SetTimer,CheckTab,Off
  170. SetTimer,YTube2,% Secs
  171. Iniwrite,0,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Tab
  172. }
  173. return
  174.  
  175. CheckTab:
  176.  
  177. Process,exist,% BProcess
  178. if !Errorlevel
  179. {
  180. ifExist,VANHEARTNET\VTitle.txt
  181. FileDelete,VANHEARTNET\VTitle.txt
  182. Loop,read,VANHEARTNET\list.txt:VAN:$DATA
  183. {
  184. Loop,parse,A_LoopReadLine,`n
  185. {
  186. RunWait,% A_LoopField
  187. sleep, % Secs
  188. WinGetTitle,VTitle,ahk_exe %BProcess%
  189. FileAppend,%VTitle%`n,VANHEARTNET\VTitle.txt
  190. }
  191. }
  192. }
  193. else
  194. {
  195. WinActivate,ahk_exe %BProcess%
  196. WinGetTitle,WinX,ahk_exe %BProcess%
  197. FileRead,JJ,VANHEARTNET\VTitle.txt
  198. IfInString,JJ,%WinX%
  199. {
  200. WinActivate,ahk_exe %BProcess%
  201. Send {LCtrl down} {LShift down} {Tab}
  202. sleep,1000
  203. Send {LCtrl up}
  204. Send {LShift up}
  205. }
  206. else
  207. {
  208. WinActivate,ahk_exe %BProcess%
  209. Send {LCtrl down} {w}
  210. sleep,1000
  211. Send {LCtrl up}
  212. return
  213. }
  214.  
  215. Loop,read,VANHEARTNET\VTitle.txt
  216. {
  217. Loop,parse,A_LoopReadLine,`n
  218. {
  219. NL:=0
  220. NL2:=(NL+1)
  221. TTL:=A_LoopField
  222.  
  223. Loop
  224. {
  225. Sleep, % Secs
  226. Process,exist,% BProcess
  227. if !ErrorLevel
  228. Break
  229. WinActivate,ahk_exe %BProcess%
  230. IfWinNotActive,ahk_exe %BProcess%
  231. WinActivate,ahk_exe %BProcess%
  232. Send {LCtrl down} {LShift down} {Tab}
  233. sleep,1000
  234. Send {LCtrl up}
  235. Send {LShift up}
  236. WinGetTitle,WinX1,ahk_exe %BProcess%
  237. IfNotInString,JJ,%WinX1%
  238. {
  239. WinActivate,ahk_exe %BProcess%
  240. Send {LCtrl down} {w}
  241. sleep,1000
  242. Send {LCtrl up}
  243. }
  244. if(TTL=WinX1)
  245. {
  246. break
  247. }
  248. else
  249. {
  250.  
  251. Continue
  252. }
  253.  
  254.  
  255. }
  256. ;~ FileDelete,VANHEARTNET\VTitle2.txt
  257. ;~ Loop
  258. ;~ {
  259. ;~ WinActivate,ahk_exe %BProcess%
  260. ;~ Send {LCtrl down} {LShift down} {Tab}
  261. ;~ sleep,1000
  262. ;~ Send {LCtrl up}
  263. ;~ Send {LShift up}
  264. ;~ WinGetTitle,WinX2,ahk_exe %BProcess%
  265. ;~ FileAppend,%WinX2%,VANHEARTNET\VTitle2.txt
  266. ;~ if(WinX2!=WinX2)
  267. ;~ {
  268. ;~ continue
  269. ;~ }
  270. ;~ else
  271. ;~ {
  272. ;~ MsgBox, Match na!
  273. ;~ Break
  274. ;~ }
  275.  
  276. ;~ }
  277. ;~ IfWinNotExist, % TTL
  278. ;~ {
  279. ;~ MsgBox, not Exist %TTL%
  280. ;~ WinActivate,ahk_exe %BProcess%
  281. ;~ Send {LCtrl down} {LShift down} {Tab}
  282. ;~ sleep,1000
  283. ;~ Send {LCtrl up}
  284. ;~ Send {LShift up}
  285. ;~ }
  286. ;~ else
  287. ;~ MsgBox, yes Exist to
  288.  
  289.  
  290. }
  291.  
  292. }
  293. ;~ FileRead,JJ2,VANHEARTNET\VTitle2.txt
  294. ;~ Loop %NL2%
  295. ;~ {
  296. ;~ MsgBox, % NL2
  297. ;~ IfNotInString,JJ2,%TTL%
  298. ;~ MsgBox, % TTL
  299. ;~ else
  300. ;~ MsgBox, in str
  301. ;~ }
  302.  
  303. }
  304.  
  305.  
  306.  
  307. return
  308.  
  309.  
  310. ReadTitle:
  311. WinGetTitle,WIN,ahk_exe %BProcess%
  312. FileRead,JJ,VANHEARTNET\VTitle.txt
  313. IfInString,WIN,% JJ
  314. MsgBox, Yes
  315. else
  316. MsgBox, No
  317. return
  318.  
  319.  
  320.  
  321. DPL:
  322. Gui,1:Submit,Nohide
  323. ;~ Gui,1:+Owndialogs
  324. ;~ MsgBox, % Browser[DPL]
  325. BProcess:=Browser[DPL]
  326. Process,close,% BProcess
  327. return
  328.  
  329. Single:
  330. SetTimer,YTube,% Secs
  331. Iniwrite,0,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,RMultiple
  332. Iniwrite,1,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,RSingle
  333. Iniwrite,0,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Tab
  334. SetTimer,YTube2,Off
  335. Guicontrol,1:Show,Edit1
  336. Guicontrol,1:Show,Edit2
  337. Guicontrol,1:Show,YTTitle
  338. Guicontrol,1:Hide,Edit4
  339. Guicontrol,1:Hide,Tab
  340. Multiple:=False
  341. return
  342.  
  343. Multiple:
  344. Gui,1:Submit,Nohide
  345. SetTimer,YTube2,% Secs
  346. SetTimer,YTube,Off
  347. Iniwrite,0,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,RSingle
  348. Iniwrite,1,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,RMultiple
  349. Guicontrol,1:Hide,Edit1
  350. Guicontrol,1:Hide,Edit2
  351. Guicontrol,1:Hide,YTTitle
  352. Guicontrol,1:Show,Edit4
  353. Guicontrol,1:Show,Tab
  354. Multiple:=True
  355. return
  356.  
  357. YTube2:
  358. Loop,read,VANHEARTNET\list.txt:VAN:$DATA
  359. {
  360. loop,parse,A_LoopReadLine,`n
  361. {
  362. if(Pause=True)
  363. {
  364. RunWait % A_Loopfield
  365. sleep,10000
  366.  
  367. WinGetTitle,Activewindow,ahk_exe %BProcess%
  368. ;~ Gui,1:+Owndialogs
  369. ;~ MsgBox, % Activewindow
  370. Loop
  371. {
  372. IfWinNotExist,% Activewindow
  373. {
  374. TrayTip, Youtube `t,Next Video...,2,1
  375. Process,close,% BProcess
  376. break
  377. }
  378. else
  379. sleep,5000
  380. }
  381. }
  382. }
  383. }
  384.  
  385. return
  386.  
  387.  
  388.  
  389. YTube:
  390. IfWinNotExist,%Window1% - YouTube - Google Chrome
  391. {
  392. Process,close,% BProcess
  393. Run, %Video1%
  394. }
  395. Else
  396. Sleep, 1000
  397. return
  398.  
  399. Subs:
  400. Gui,1:Submit,Nohide
  401. Start:=!Start
  402. if Start
  403. {
  404. if(Multiple=1)
  405. {
  406. Gui,1:+Owndialogs
  407. MsgBox, 262208, Message, Paused!
  408. Pause:=False
  409. SetTimer,YTube2,off
  410.  
  411. }
  412. else
  413. {
  414. Pause:=False
  415. SetTimer,YTube,off
  416.  
  417. }
  418. run, https://www.youtube.com/channel/UCSCrcDEgpvxrxL-ZmRbkYKw/
  419. Run,https://www.facebook.com/messages/t/js.vanheartnet
  420.  
  421. }
  422. else
  423. {
  424. if(Multiple=1)
  425. {
  426. Gui,1:+Owndialogs
  427. MsgBox, 262208, Message, Play!
  428. Pause:=True
  429. SetTimer,YTube2,On
  430.  
  431. }
  432. else
  433. {
  434. Pause:=True
  435. SetTimer,YTube,On
  436.  
  437. }
  438. run, https://www.youtube.com/channel/UCSCrcDEgpvxrxL-ZmRbkYKw/
  439. Run,https://www.facebook.com/messages/t/js.vanheartnet
  440. }
  441. return
  442.  
  443. Button1:
  444. guicontrol,1:Enable,Edit1
  445. guicontrol,1:Enable,Edit2
  446. guicontrol,1:Enable,Edit3
  447. guicontrol,1:Enable,Edit4
  448. GuiControl,1:Hide,Button1
  449. GuiControl,1:Show,Button2
  450. return
  451.  
  452.  
  453. Button2:
  454. gui,1:Submit,Nohide
  455. if (Edit1="" or Edit2="" or Edit3="")
  456. {
  457. IniWrite,https://www.youtube.com/watch?v=Coodor-yxv4&t=234s,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Video
  458. IniWrite,Roblox Portable by VANHEARTNET,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Window
  459. IniWrite,10000,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Secs
  460. sleep,1000
  461. Reload
  462. return
  463. }
  464. FileDelete,VANHEARTNET\list.txt:VAN:$DATA
  465. FileAppend,%Edit4%,VANHEARTNET\list.txt:VAN:$DATA
  466.  
  467. IniWrite,%Edit1%,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Video
  468. IniWrite,%Edit2%,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Window
  469. EditSec:=(Edit3*1000)
  470. IniWrite,%EditSec%,VANHEARTNET\Settings.ini:VAN:$DATA,Settings,Secs
  471. GuiControl,1:Disable,Edit1
  472. GuiControl,1:Disable,Edit2
  473. GuiControl,1:Disable,Edit3
  474. GuiControl,1:Disable,Edit4
  475. GuiControl,1:Hide,Button2
  476. GuiControl,1:Show,Button1
  477. Reload
  478. return
  479.  
  480.  
  481. Esc::
  482. GuiClose:
  483. Send {LCtrl up}
  484. Send {LShift up}
  485. FileDelete,VANHEARTNET\VTitle.txt
  486. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment