Advertisement
l0m_

Dethkarz Widescreen

Nov 22nd, 2020 (edited)
1,599
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; For some reason the folder where exe is located must not be named "Dethkarz"
  2.  
  3. #SingleInstance force
  4.  
  5. SetTitleMatchMode, 3
  6.  
  7. if !FileExist(A_ScriptDir . "\Dethkarz.exe") {
  8.     MsgBox, Dethkarz.exe not found
  9.     ExitApp
  10. }
  11.  
  12. Gui, +hwndghwnd -Caption
  13. Gui,Color,Black,000000
  14. Gui, Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%
  15.  
  16. WinHide, ahk_class Shell_TrayWnd
  17. WinHide, ahk_class Shell_SecondaryTrayWnd
  18. WinHide, Start ahk_class Button
  19.  
  20. Run, Dethkarz.exe, %A_ScriptDir%,, dkPid
  21. WinWait ahk_pid %dkPid%
  22. WinGet, dkhwnd, ID, ahk_pid %dkPid%
  23.  
  24. Sleep, 2000
  25.  
  26. WinSet, Style, 0x8000000, % "ahk_id " dkhwnd
  27.  
  28. DllCall("SetParent", uInt, dkhwnd, uInt, ghwnd)
  29. WinMove, % "ahk_id " dkhwnd,, 0, 0, A_ScreenWidth, A_ScreenHeight
  30.  
  31. DllCall("SetWindowPos"
  32.     ,"UInt", ghwnd
  33.     ,"UInt", 1        ; hWndInsertAfter
  34.     ,"Int" , -10 ; x
  35.     ,"Int" , -488 ; y
  36.     ,"Int" , A_ScreenWidth + 10 ; w
  37.     ,"Int" , A_ScreenHeight + 488 ; h
  38.     ,"UInt", 0x400) ; uFlags
  39.  
  40. WinWaitClose
  41.  
  42. DllCall("SetWindowPos"
  43.     ,"UInt", ghwnd
  44.     ,"UInt", 1        ; hWndInsertAfter
  45.     ,"Int" , 0 ; x
  46.     ,"Int" , 0 ; y
  47.     ,"Int" , 0 ; w
  48.     ,"Int" , 0 ; h
  49.     ,"UInt", -0x400) ; uFlags
  50.  
  51. WinShow, ahk_class Shell_TrayWnd
  52. WinShow, ahk_class Shell_SecondaryTrayWnd
  53. WinShow, Start ahk_class Button
  54. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement