Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- While 1
- $pList = ProcessList("League of Legends.exe")
- For $i = 1 To $pList[0][0]
- WinActivate(HWnd(_GetHwndFromPID($pList[$i][1])))
- Sleep(2000)
- Next
- ProcessClose("BsSndRpt.exe")
- Sleep(10000)
- WEnd
- Func _GetHwndFromPID($PID)
- $hWnd = 0
- $winlist = WinList()
- Do
- For $i = 1 To $winlist[0][0]
- If $winlist[$i][0] <> "" Then
- $iPID2 = WinGetProcess($winlist[$i][1])
- If $iPID2 = $PID Then
- $hWnd = $winlist[$i][1]
- ExitLoop
- EndIf
- EndIf
- Next
- Until $hWnd <> 0
- Return $hWnd
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment