예제 #1
0
def OnIdle(tag,keywords):

    global RunNode,RunList
    global ErrThread,OutThread
    global ExitCode,OwnIdleHook

    c=keywords.get('c')
    if not c or not c.exists: return

    if not OwnIdleHook: return
    
    # g.trace(c.shortFileName())

    if RunNode:
        o = UpdateText(OutThread)
        e = UpdateText(ErrThread,"red")
        if not o and not e:
            CloseProcess(c)	
    elif RunList:
        fn = RunList[0]
        del RunList[0]
        if fn and ExitCode is None:
            OpenProcess(fn)					
    else:
        OwnIdleHook = False
        g.disableIdleTimeHook()
예제 #2
0
def OnIdle(tag, keywords):

    global RunNode, RunList
    global ErrThread, OutThread
    global ExitCode, OwnIdleHook

    c = keywords.get('c')
    if not c or not c.exists: return

    if not OwnIdleHook: return

    # g.trace(c.shortFileName())

    if RunNode:
        o = UpdateText(OutThread)
        e = UpdateText(ErrThread, "red")
        if not o and not e:
            CloseProcess(c)
    elif RunList:
        fn = RunList[0]
        del RunList[0]
        if fn and ExitCode is None:
            OpenProcess(fn)
    else:
        OwnIdleHook = False
        g.disableIdleTimeHook()
예제 #3
0
def OnQuit(tag,keywords=None):

    global RunNode,RunList
    c = keywords.get('c')
    if c and RunList:
        RunList = None
        g.disableIdleTimeHook()
        if RunNode:
            CloseProcess(c)
        g.error("@run: forced quit!")
예제 #4
0
def OnQuit(tag,keywords=None):

    global RunNode,RunList

    if RunList:
        RunList = None
        g.disableIdleTimeHook()
        if RunNode:
            CloseProcess()
        g.error("@run: forced quit!")