Re: [Sikuli-driver] [Question #665352]: App.open only works once then fails

2018-03-08 Thread Shawn Robertson
Question #665352 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665352

Shawn Robertson posted a new comment:
Thank you Raiman!

-- 
You received this question notification because your team Sikuli Drivers
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


Re: [Sikuli-driver] [Question #665352]: App.open only works once then fails

2018-03-08 Thread RaiMan
Question #665352 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665352

RaiMan posted a new comment:
In version 1.1.2 the message from the App.close() will no longer be an error, 
but only an action log saying
[log] App.close():  already closed

if used as you do it.

More will not be changed, since using an App object, you have to live
with the need to change its state using the designated methods.

-- 
You received this question notification because your team Sikuli Drivers
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


Re: [Sikuli-driver] [Question #665352]: App.open only works once then fails

2018-03-07 Thread Shawn Robertson
Question #665352 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665352

Shawn Robertson posted a new comment:
yes sir, I can confirm it does work now albeit with the complaining
message:

[error] App.close [-1:Timeslip.exe (timeslip)]
C:\tssmoketest\2019\timeslip.exe did not work

how4ever it does open successfully.

i will just use this work around as my solution. i don't know if this is
considered a bug that warrants  "fix" so I will just use this work
around as my official solution. maybe one day there will be another way
to handle this scenario but for now all is good. Thank you!

-- 
You received this question notification because your team Sikuli Drivers
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


Re: [Sikuli-driver] [Question #665352]: App.open only works once then fails

2018-03-07 Thread RaiMan
Question #665352 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665352

RaiMan proposed the following answer:
Nevertheless I will try to fix this behavior at least to more
understandable error messages.

-- 
You received this question notification because your team Sikuli Drivers
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


Re: [Sikuli-driver] [Question #665352]: App.open only works once then fails

2018-03-07 Thread RaiMan
Question #665352 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665352

RaiMan proposed the following answer:
just checked:
the mentioned trick works:
- close() complains, that it did not work, but then the reopen does its job

-- 
You received this question notification because your team Sikuli Drivers
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


Re: [Sikuli-driver] [Question #665352]: App.open only works once then fails

2018-03-07 Thread RaiMan
Question #665352 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665352

RaiMan proposed the following answer:
ok, thanks for clarification.
I just started to test and found out, that the first sequence does not make 
problems.

In the second (changed to your own close() method) I guess, that the
problem is, that the App object now is left in a state, where it thinks
it is still running, but is not, since it is closed somewhere else.

Maybe it helps, if you put an 
timeslip.close() 
to the end of your function TSAppClose().
Should not do any harm, but might reset the state, so it opens again afterwards.

[error] App.open failed: C:\tssmoketest\2019\timeslip.exe not found
this message might be misleading, since I guess it is simply wrong and a result 
of the undefined state of the app object.

Nevertheless I will check, wether the implementation does not say on
reopen: the app was not closed, but is not running anymore - it will now
be reset and reopened.

-- 
You received this question notification because your team Sikuli Drivers
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


Re: [Sikuli-driver] [Question #665352]: App.open only works once then fails

2018-03-07 Thread Shawn Robertson
Question #665352 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665352

Shawn Robertson posted a new comment:
ok i have to update i was incorrect in my explanation I apologize.

if i do this:

timeslip = App(os.path.join(r"C:\tssmoketest", Settings.Version, 
"timeslip.exe"))
timeslip.open()
timeslip.close()
timeslip.open()
timeslip.close()
timeslip.open()
timeslip.close()

it works and I get:
[log] App.open [6920:Timeslip.exe]

[log] App.close: [6920:Timeslip.exe]

[log] App.open [2812:Timeslip.exe]

[log] App.close: [2812:Timeslip.exe]

[log] App.open [8660:Timeslip.exe]

[log] App.close: [8660:Timeslip.exe]



i can no longer do this method now because we made code changes to our core EXE 
application and Killing the process leaves TIMESLIP.EXE running as aproecss 
because Threads are running in the back ground.

so that  is why I had to make a new method of:
def TSAppClose():
type(Key.F4, KeyModifier.ALT)
wait(IMG_timeslips_exit_dialog_popup, 30)
type('y', KeyModifier.ALT)
waitVanish(IMG_timeslips_exit_dialog_popup)
if exists(IMG_Win10BackupCurrentDBonExit):
type('n', KeyModifier.ALT)
waitVanish(IMG_Win10BackupCurrentDBonExit)

and i had to change my code in the script to this:

timeslip = App(os.path.join(r"C:\tssmoketest", Settings.Version, 
"timeslip.exe"))
timeslip.open()
TSAppClose()
timeslip.open()


when i do this new script code... that is when it fails and i get:

[error] App.open failed: C:\tssmoketest\2019\timeslip.exe not found so I
have to changemy code to this to make it work:


timeslip = App(os.path.join(r"C:\tssmoketest", Settings.Version, 
"timeslip.exe"))
timeslip.open()
TSAppClose()

timeslip = App(os.path.join(r"C:\tssmoketest", Settings.Version, 
"timeslip.exe"))
timeslip.open()
TSAppClose()

timeslip = App(os.path.join(r"C:\tssmoketest", Settings.Version, 
"timeslip.exe"))
timeslip.open()
TSAppClose()


I apologize for not explaining myself properly the first time.

thank you for any advice or help

-- 
You received this question notification because your team Sikuli Drivers
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


Re: [Sikuli-driver] [Question #665352]: App.open only works once then fails

2018-03-07 Thread Shawn Robertson
Question #665352 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665352

Description changed to:
Sikuli X 1.1.2 March Nightly (same effect with 1.1.1 Stable)
Windows 10 Creators Fall update with all latest patches installed


i  have my automation script that has always worked. even after updating to 
Windows 10 Creators update it still worked but out of now here now it no longer 
works the same way.

at the top of my main Unit i define my App instance:

timeslip = App(os.path.join(r"C:\tssmoketest", Settings.Version,
"timeslip.exe"))

then later I call it:

timeslip.open()


it works the first time which i close either with:

timeslip.close() or another method I created called TSAppClose() which
is just:

def TSAppClose():
type(Key.F4, KeyModifier.ALT)
wait(IMG_timeslips_exit_dialog_popup, 30)
type('y', KeyModifier.ALT)
waitVanish(IMG_timeslips_exit_dialog_popup)
if exists(IMG_Win10BackupCurrentDBonExit):
type('n', KeyModifier.ALT)
waitVanish(IMG_Win10BackupCurrentDBonExit)

either one works fine. timeslip.close() kills the process and
TSAppClose() gracerfully closes my app correctly with the UI which
cleans up any threads that are running which killing the main process
does not.


back to my issue.

if i do this:
timeslip = App(os.path.join(r"C:\tssmoketest", Settings.Version, 
"timeslip.exe"))
timeslip.open() 
timeslip.close()
timeslip.open() 

i get:

[log] App.open [8816:Timeslip.exe]
[log] App.close [8816:Timeslip.exe]

[error] App.open failed: C:\tssmoketest\2019\timeslip.exe not found


the only way i can get around it is by doing this:

timeslip = App(os.path.join(r"C:\tssmoketest", Settings.Version, 
"timeslip.exe"))
timeslip.open()
timeslip.close()

timeslip = App(os.path.join(r"C:\tssmoketest", Settings.Version, 
"timeslip.exe"))
timeslip.open()
timeslip.close()


any idea what i have to define my app instance every time I call it
instead of just being able to define it once and call it multiple times?

-- 
You received this question notification because your team Sikuli Drivers
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


Re: [Sikuli-driver] [Question #665352]: App.open only works once then fails

2018-03-07 Thread RaiMan
Question #665352 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665352

Status: Open => Answered

RaiMan proposed the following answer:
I will have a look at it.

-- 
You received this question notification because your team Sikuli Drivers
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


[Sikuli-driver] [Question #665352]: App.open only works once then fails

2018-03-07 Thread Shawn Robertson
New question #665352 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665352

Sikuli X 1.1.2 March Nightly (same effect with 1.1.1 Stable)
Windows 10 Creators Fall update with all latest patches installed


i  have my automation script that has always worked. even after updating to 
Windows 10 Creators update it still worked but out of now here now it no longer 
works the same way.

at the top of my main Unit i define my App instance:

timeslip = App(os.path.join(r"C:\tssmoketest", Settings.Version, 
"timeslip.exe"))

then later I call it:

timeslip.open()


it works the first time which i close either with:

timeslip.close() or another method I created called TSAppClose() which is just:

def TSAppClose():
type(Key.F4, KeyModifier.ALT)
wait(IMG_timeslips_exit_dialog_popup, 30)
type('y', KeyModifier.ALT)
waitVanish(IMG_timeslips_exit_dialog_popup)
if exists(IMG_Win10BackupCurrentDBonExit):
type('n', KeyModifier.ALT)
waitVanish(IMG_Win10BackupCurrentDBonExit)

either one works fine. timeslip.close() kills the process and TSAppClose() 
gracerfully closes my app correctly with the UI which cleans up any threads 
that are running which killing the main process does not.



back to my issue.

if i do this:
timeslip = App(os.path.join(r"C:\tssmoketest", Settings.Version, 
"timeslip.exe"))
timeslip.open() 
timeslip.close()
timeslip.open() 

i get:

[error] App.open failed: C:\tssmoketest\2019\timeslip.exe not found

the only way i can get around it is by doing this:

timeslip = App(os.path.join(r"C:\tssmoketest", Settings.Version, 
"timeslip.exe"))
timeslip.open()
timeslip.close()

timeslip = App(os.path.join(r"C:\tssmoketest", Settings.Version, 
"timeslip.exe"))
timeslip.open()
timeslip.close()



any idea what i have to define my app instance every time I call it instead of 
just being able to define it once and call it multiple times?




-- 
You received this question notification because your team Sikuli Drivers
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