open command box as timer.

Asked by MJ

I'm currently running a macro program that doesn't wait for any dos/java programs to complete. so my workaround is to open a command box, my macro waits for the command box to disappear.

When the command window goes to the background, sikuli can't see it for some reason that keeps the system paused.

please help.

for n in range(1):
# if exists("1469305284558.png"):
    reg = Region(609,140,894,766)
if reg.exists(Pattern("1469321512445.png").similar(0.50), 0) or reg.exists(Pattern("1470254195609.png").similar(0.50), 0) or reg.exists(Pattern("1470143332576.png").similar(0.50), 0):
        click(Pattern("1469305690339.png").similar(0.90).targetOffset(-70,-9))
 # wait(.5)
        type(Key.ENTER)
        type("v", KeyModifier.CTRL)
        type(Key.ENTER)
        type("s", KeyModifier.CTRL)
else:
        click(Pattern("1469222076906-1.png").targetOffset(-647,497))
        click(Pattern("1472489879950.png").similar(0.60).targetOffset(-60,-1))
        type("0", KeyModifier.CTRL)
        import os
        cmdPath = os.getenv("comspec")
        title = "Timer Runner"
        cmd = 'start "%s" %s'%(title, cmdPath)
        os.popen(cmd); wait(1)
        wait(5.0)
        type("exit" + Key.ENTER)
      # os.system("taskkill /im cmd.exe /f")

Question information

Language:
English Edit question
Status:
Expired
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.