sikuli click function opening microsoft office

Asked by Zach Anderson

I am currently running an application using sikuli via a python script. Whenever the click function is executed, microsoft office is launched. Looking at the sikuli log, you can see that the windows shortcut is being executed, Meta+Ctrl+Alt+Shift+CLICK on L(300,199)@S(0)[0,0 1920x1200]. Any idea on how to avoid this?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Zach Anderson
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

What version of SikuliX?

please post a click usage example.

Revision history for this message
Zach Anderson (an3der2son) said :
#2

I'm running 2.0.5

Launching a script using
        sikuliProcess = System.Diagnostics.Process()
        script = self.TB_WORKING_DIR + os.sep + self.TEST_ID + '.sikuli'
        sikuli_log = self.TB_WORKING_DIR + os.sep + 'SikuliLog.log'
        sikuliProcess.StartInfo.FileName = self.SIKULI_TEST_PKG + os.sep + 'runsikulix.cmd'
        sikuliProcess.StartInfo.Arguments = ' -r "' + script + '" -f "' + sikuli_log + '"
        sikuliProcess.Start()

Running an application and here is where it occurs in the script
         x = os.environ['PARTSDIR'] + "\\General\\"
         click(x + "CheckMark.png")

Revision history for this message
RaiMan (raimund-hocke) said :
#3

The script launch seems to be done from c#. Not my world and hence no experience, sorry.

Did you already check, wether the click works as expected in the SikuliX IDE?

Revision history for this message
Zach Anderson (an3der2son) said :
#4

in a separate function I had a extra wait in the click that was causing this issue. click(<image>,10)

Revision history for this message
RaiMan (raimund-hocke) said :
#5

LOL, did not dare to ask, wether you have used click(<image>, <value>) :-))

with click(someImage, n), the n is not a waittime, but a code for the extra keys, that should be pressed with the click (sum of distinct binary values for the keys like CTRL, SHIFT, ...).

with click(someImage) the standard waittime (3 secs) is used, if not otherwise set via Settings.

another way:
wait(someImage, 10) #waits max 10 secs for the match
click() # clicks the last match