Advertisement
Najeebsk

Video-Player-Password.ahk

Aug 25th, 2022
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; <COMPILER: v1.1.34.03>
  2. #NoEnv
  3. #SingleInstance, Force
  4. SetBatchLines, -1
  5. ;#NoTrayIcon
  6. SetWorkingDir %A_ScriptDir%  
  7. IfNotExist, %A_ScriptDir%\V
  8.  FileCreateDir, %A_ScriptDir%\V
  9. FileSetAttrib +HS, %A_ScriptDir%\V, 2
  10.  
  11. #Include, MyFileInstall.txt
  12. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  13. Gui,New, +Hwndmygui
  14. Gui -Caption +ToolWindow +Border +LastFound +AlwaysOnTop -Border +hWndhGUI
  15. Gui,Font,S12 Bold,Verdana ;Calibri
  16. Gui, Color, 884488
  17. Gui, Add, Button, hWndhButton2 x5 y5 w0 h0 gGuiMove,
  18. Gui,Add,Text,x10 y14,Password:-
  19. Gui,Add,Edit,x110 y12  r1 password vpass
  20. Gui,Add,DropDownList, x300 y12 vdd_var, Select-Player||M-Player|MPV-Play|X-Player|Def-Play|
  21. Gui,Add,Button,x490 y10 Default,PLAY
  22. Gui,Add,Button,x565 y10 gDel, DELETE
  23. Gui, Show, x0 y30 w680 h50 Center, Video Viewer
  24. WinSet, Region, 0-0 W680 H50 R20-20,
  25. WinMove, 0, 0
  26. OnMessage( 0x200, "WM_MOUSEMOVE")
  27. Return
  28. Space::
  29.     if (WinExist("ahk_id " mygui))
  30.         Gui %mygui%: Hide
  31.     else
  32.         Gui %mygui%: Show
  33. Return
  34. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  35. GuiMove:
  36.  PostMessage, 0xA1, 2,,, NAJEEB SCRIPT BOOK
  37. Return
  38. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  39. WM_MOUSEMOVE(wparam, lparam, msg, hwnd)
  40. {
  41.     if wparam = 1 ; LButton
  42.         PostMessage, 0xA1, 2,,, A ; WM_NCLBUTTONDOWN
  43. }
  44.  
  45. Return
  46. ButtonPLAY:
  47. Gui,Submit
  48. if pass = sonyNSK
  49.     {
  50.     goto,menu
  51.     }
  52. else
  53.     {
  54.     msgbox,16,,Incorrect password, access denied
  55.     exitapp
  56.     }
  57. Return
  58.  
  59. menu:
  60. Gui, submit, nohide
  61.     if dd_var = M-Player
  62.                          Run, "%A_ScriptDir%\V\MP.exe" "%A_ScriptDir%\V\PLAY.m3u"
  63.     if dd_var = MPV-Play
  64.              Run, "%A_ScriptDir%\V\mpv.exe" "%A_ScriptDir%\V\PLAY.m3u"
  65.     if dd_var = X-Player
  66.                          Run, "%A_ScriptDir%\V\XP.exe" "%A_ScriptDir%\V\B.mp4"
  67.     if dd_var = Def-Play
  68.                          Run, "%A_ScriptDir%\V\PLAY.m3u"
  69. Return
  70. ;GuiControlGet, PlayerChoise
  71. ;Run, "%A_ScriptDir%\V\%PlayerChoise%.exe" "%A_ScriptDir%\V\PLAY.m3u"  
  72. ;Return
  73. Del:
  74. Gui, submit, nohide
  75. FileRemoveDir, %A_ScriptDir%\V, 1
  76.       if errorlevel
  77.          {
  78.          msgbox failed, trying again
  79.          loop
  80.             {
  81.             FileRemoveDir, %A_ScriptDir%\V, 1
  82.             if !errorlevel
  83.                break
  84.             msgbox ...trying again...
  85.             }
  86.          }
  87. Return
  88. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  89. #R::Reload  ;<--  ~ Reload Script ~
  90. #S::Suspend ;<--  ~ Suspend Script ~
  91. #P::Pause   ;<--  ~ Pause Script ~
  92. #M::WinMinimize, ;<--  ~ Minimize Script ~
  93. ESC::ExitApp     ;<--  ~ Exit Script ~
  94.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement