Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; For some reason the folder where exe is located must not be named "Dethkarz"
- #SingleInstance force
- SetTitleMatchMode, 3
- if !FileExist(A_ScriptDir . "\Dethkarz.exe") {
- MsgBox, Dethkarz.exe not found
- ExitApp
- }
- Gui, +hwndghwnd -Caption
- Gui,Color,Black,000000
- Gui, Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%
- WinHide, ahk_class Shell_TrayWnd
- WinHide, ahk_class Shell_SecondaryTrayWnd
- WinHide, Start ahk_class Button
- Run, Dethkarz.exe, %A_ScriptDir%,, dkPid
- WinWait ahk_pid %dkPid%
- WinGet, dkhwnd, ID, ahk_pid %dkPid%
- Sleep, 2000
- WinSet, Style, 0x8000000, % "ahk_id " dkhwnd
- DllCall("SetParent", uInt, dkhwnd, uInt, ghwnd)
- WinMove, % "ahk_id " dkhwnd,, 0, 0, A_ScreenWidth, A_ScreenHeight
- DllCall("SetWindowPos"
- ,"UInt", ghwnd
- ,"UInt", 1 ; hWndInsertAfter
- ,"Int" , -10 ; x
- ,"Int" , -488 ; y
- ,"Int" , A_ScreenWidth + 10 ; w
- ,"Int" , A_ScreenHeight + 488 ; h
- ,"UInt", 0x400) ; uFlags
- WinWaitClose
- DllCall("SetWindowPos"
- ,"UInt", ghwnd
- ,"UInt", 1 ; hWndInsertAfter
- ,"Int" , 0 ; x
- ,"Int" , 0 ; y
- ,"Int" , 0 ; w
- ,"Int" , 0 ; h
- ,"UInt", -0x400) ; uFlags
- WinShow, ahk_class Shell_TrayWnd
- WinShow, ahk_class Shell_SecondaryTrayWnd
- WinShow, Start ahk_class Button
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement