Question #234686 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/234686
RaiMan posted a new comment: Thanks for kind feedback. I take time for things I am interested in ;-) I fully understand your approach and agree. But again: Leo is only one approach, to take the outline of a workflow to a higher level of abstraction. And it is not the easiest one with respect to the implementation of the Sikuli features. One of the former developers of Sikuli (Tom Yeh) has made an interesting approach to outline a visual workflow: http://slides.sikuli.org One workflow step = one slide of a presentation What I am after is some generalized language, that allows to write down visual workflows in a more natural language, where some keywords define workflow and the possible actions: your example for example: when you see image1, then I am in work mode when you see image2, then I am in play mode when I am in work mode, then accumulate the time as work time when I am in play mode, then do nothing when I shutdown, show my work time and quit When you first run this script, you will be asked for the 2 images and a name for the customized workflow. The generated Sikuli script might look like this: workMode = False PlayMode = False isShutdown = false workTime = 0 startTime = 0 def startTimer(): global startTime startTime = time.time() def stopTimer(): global startTime, workTime worktime = worktime + time.time() - startTime # to get in one of the 2 modes at startup while not isShutdown: if exists(image1): workMode = True startTimer() break elif exists(image2): playMode = True break # running while not isShutdown: if workMode and exists(image2): workMode = False stopTimer() playMode = True continue if playMode and exists(image1): playMode = False workMode = True startTimer() continue # shutdown requested popup("work time = " + str(workTime)) ... and this script could be generated in any Sikuli capable scripting language or even as Java class. -- You received this question notification because you are a member of Sikuli Drivers, which is an answer contact for Sikuli. _______________________________________________ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp