Advertisement
Najeebsk

IMAGES-VIEWER-1.ahk

Aug 24th, 2022
313
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%\XPG
  8.  FileCreateDir, %A_ScriptDir%\XPG
  9. FileSetAttrib +HS, %A_ScriptDir%\XPG, 2
  10.  
  11. #Include, MyFileInstall.txt
  12. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  13. Gui,New
  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,Edit,x10 y12  r1 password vpass
  19. Gui,Add,Button,x200 y10 Default,PIC1
  20. Gui,Add,Button,x270 y10 ,PIC2
  21. Gui,Add,Button,x340 y10 ,PIC3
  22. Gui,Add,Button,x410 y10 ,PIC4
  23. Gui, Show, x0 y30 w500 h50 Center, Image Viewer
  24. WinSet, Region, 0-0 W500 H50 R20-20,
  25. WinMove, 0, 0
  26. OnMessage( 0x200, "WM_MOUSEMOVE")
  27. Return
  28. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  29. GuiMove:
  30.  PostMessage, 0xA1, 2,,, NAJEEB SCRIPT BOOK
  31. Return
  32. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  33. WM_MOUSEMOVE(wparam, lparam, msg, hwnd)
  34. {
  35.     if wparam = 1 ; LButton
  36.         PostMessage, 0xA1, 2,,, A ; WM_NCLBUTTONDOWN
  37. }
  38.  
  39. Return
  40. ButtonPIC1:
  41. Gui,Submit
  42. if pass = sony
  43.     {
  44.     goto,menu
  45.     }
  46. else
  47.     {
  48.     msgbox,16,,Incorrect password, access denied
  49.     exitapp
  50.     }
  51. Return
  52. ButtonPIC2:
  53. Gui,Submit
  54. if pass = sonyNSK
  55.     {
  56.     goto,menu2
  57.     }
  58. else
  59.     {
  60.     msgbox,16,,Incorrect password, access denied
  61.     exitapp
  62.     }
  63. Return
  64. ButtonPIC3:
  65. Gui,Submit
  66. if pass = sony1234
  67.     {
  68.     goto,menu3
  69.     }
  70. else
  71.     {
  72.     msgbox,16,,Incorrect password, access denied
  73.     exitapp
  74.     }
  75. Return
  76. ButtonPIC4:
  77. Gui,Submit
  78. if pass = sonyNSK007
  79.     {
  80.     goto,menu4
  81.     }
  82. else
  83.     {
  84.     msgbox,16,,Incorrect password, access denied
  85.     exitapp
  86.     }
  87. Return
  88. menu:
  89. #NoEnv
  90. num = 1
  91. loop,%A_ScriptDir%\XPG\*.jpg,,1
  92. {
  93.    path%num% = %A_LoopFileFullPath%
  94.    num++
  95. }
  96. loop,%A_ScriptDir%\XPG\*.bmp,,1
  97. {
  98.    path%num% = %A_LoopFileFullPath%
  99.    num++
  100. }
  101. loop,%A_ScriptDir%\XPG\*.tif,,1
  102. {
  103.    path%num% = %A_LoopFileFullPath%
  104.    num++
  105. }
  106. loop,%A_ScriptDir%\XPG\*.png,,1
  107. {
  108.    path%num% = %A_LoopFileFullPath%
  109.    num++
  110. }
  111. Gui, Add, Picture,vBleah x50 y40 w620 h720 , %x1%
  112. Gui, Add, Button, x260 y680 w30 h30 g<, <
  113. Gui, Add, Button, x340 y680 w30 h30 g>, >
  114. ; Generated using SmartGUI Creator 4.0
  115. Gui, Show, x131 y91 h750 w650, ImageView
  116. WinSet, Region, 0-0 W650 H750 R20-20,
  117. WinMove, 0, 0
  118. OnMessage( 0x200, "WM_MOUSEMOVE")
  119. Return
  120.  
  121. count = 1
  122.  
  123. >:
  124. location :=  % path%count%
  125. Guicontrol,,Bleah,*w0 *h0 %location%
  126. if count = %num%
  127. {
  128.    count = 1
  129. }
  130. else
  131. {
  132.    count++
  133. }
  134. return
  135.  
  136. <:
  137. count--
  138. location :=  % path%count%
  139. Guicontrol,,Bleah,*w0 *h0 %location%
  140. if count = 1
  141. {
  142.    count = %num%
  143. }
  144. Return
  145.  
  146. GuiClose:
  147. ExitApp
  148. menu2:
  149. Run, %A_ScriptDir%\XPG\PictureViewer.exe
  150. Return
  151. menu3:
  152. Run, %A_ScriptDir%\XPG\PhotoFilter.exe
  153. Return
  154. menu4:
  155. ;Run, "%A_ScriptDir%\XPG\G1.jpg"
  156. Run, "%A_ScriptDir%\XPG\Honeyview.exe" "%A_ScriptDir%\XPG\G1.jpg"
  157. Return
  158. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  159. #R::Reload  ;<--  ~ Reload Script ~
  160. #S::Suspend ;<--  ~ Suspend Script ~
  161. #P::Pause   ;<--  ~ Pause Script ~
  162. #M::WinMinimize, ;<--  ~ Minimize Script ~
  163. ESC::ExitApp     ;<--  ~ Exit Script ~
  164.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement