def change_queue_complete_action(action, new=True):
 global QUEUECOMPLETE, QUEUECOMPLETEACTION, QUEUECOMPLETEARG
 _action = None
 _argument = None
 if ('script_' in action):
  _action = run_script
  _argument = action.replace('script_', '')
 elif (new or cfg.queue_complete_pers.get()):
  if (action == 'shutdown_pc'):
   _action = system_shutdown
  elif (action == 'hibernate_pc'):
   _action = system_hibernate
  elif (action == 'standby_pc'):
   _action = system_standby
  elif (action == 'shutdown_program'):
   _action = shutdown_program
  else:
   action = None
 else:
  action = None
 if new:
  cfg.queue_complete.set((action or ''))
  config.save_config()
 QUEUECOMPLETE = action
 QUEUECOMPLETEACTION = _action
 QUEUECOMPLETEARG = _argument

def change_queue_complete_action ( action , new = True ) : global QUEUECOMPLETE , QUEUECOMPLETEACTION , QUEUECOMPLETEARG _action = None _argument = None if ( 'script_' in action ) : _action = run_script _argument = action . replace ( 'script_' , '' ) elif ( new or cfg . queue_complete_pers . get ( ) ) : if ( action == 'shutdown_pc' ) : _action = system_shutdown elif ( action == 'hibernate_pc' ) : _action = system_hibernate elif ( action == 'standby_pc' ) : _action = system_standby elif ( action == 'shutdown_program' ) : _action = shutdown_program else : action = None else : action = None if new : cfg . queue_complete . set ( ( action or '' ) ) config . save_config ( ) QUEUECOMPLETE = action QUEUECOMPLETEACTION = _action QUEUECOMPLETEARG = _argument
action or script to be performed once the queue has been completed scripts are prefixed with script_ when "new" is false .