original_docstring: 
      Returns the currently focused/active
      program in Windows only. Three modes:
      (1) mode = "pid" - Process ID
      (2) mode = "title" - Window title
      (3) mode = "process" - Process/Program name + start time
  
      by Max Schmeling
      
docstring: Returns the currently focused/active
  program in Windows only.
  
  by Max Schmeling
docstring_tokens: Returns the currently focused / active program in Windows only . by Max Schmeling
code: def GetFocusProcess(mode):
      """
      Returns the currently focused/active
      program in Windows only. Three modes:
      (1) mode = "pid" - Process ID
      (2) mode = "title" - Window title
      (3) mode = "process" - Process/Program name + start time
  
      by Max Schmeling
      """
      #Dependancies:
      #from win32process import GetWindowThreadProcessId
      #from win32gui import GetForegroundWindow
      #from psutil import Process
      foreground_win_id = GetForegroundWindow()
      foreground_pid = GetWindowThreadProcessId(foreground_win_id)[1]
      if mode == "pid":
          return foreground_pid
      elif mode == "title":
          return GetWindowText(foreground_win_id)
      elif mode == "process":
          foreground_proc_name = Process(foreground_pid).name()
          #foreground_proc_tstart = Process(foreground_pid).started()
          return (foreground_proc_name, foreground_pid)
          
      return False
code_tokens: def GetFocusProcess ( mode ) : foreground_win_id = GetForegroundWindow ( ) foreground_pid = GetWindowThreadProcessId ( foreground_win_id ) [ 1 ] if mode == "pid" : return foreground_pid elif mode == "title" : return GetWindowText ( foreground_win_id ) elif mode == "process" : foreground_proc_name = Process ( foreground_pid ) . name ( ) return ( foreground_proc_name , foreground_pid ) return False
short_docstring: Returns the currently focused/active
  program in Windows only.
short_docstring_tokens: Returns the currently focused / active program in Windows only .
comment: """
      Returns the currently focused/active
      program in Windows only. Three modes:
      (1) mode = "pid" - Process ID
      (2) mode = "title" - Window title
      (3) mode = "process" - Process/Program name + start time
  
      by Max Schmeling
      """$SEP$#Dependancies:
  $SEP$#from win32process import GetWindowThreadProcessId
  $SEP$#from win32gui import GetForegroundWindow
  $SEP$#from psutil import Process
  $SEP$#foreground_proc_tstart = Process(foreground_pid).started()
  