Skip to content
Discussion options

You must be logged in to vote

You can try a static variable or call removeOnIdleWinMsg inside onIdle

Example
http://www.theswamp.org/index.php?topic=59164.msg618845#msg618845

import traceback
from pyrx_imp import Rx, Ge, Gi, Db, Ap, Ed, Ax

def worker(args = None):
    print(args)
    
def onIdleOnce():
    try:
        worker("yay!")
        Ap.Application.removeOnIdleWinMsg(onIdleOnce)
    except Exception as err:
        traceback.print_exception(err)
 
@Ap.Command()
def doit():
    try:
        Ap.Application.registerOnIdleWinMsg(onIdleOnce)
    except Exception as err:
        traceback.print_exception(err)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gswifort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants