Script won't stop

Asked by Ben

I am using a while True and Except script which i think is interfering when i try stop the script from executing. When i press alt shift c it stops briefly but then tries to carry on. How can I stop this as every time i want to edit the script i have to try shut sikuli down and open it again?

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Eugene S (shragovich) said :
#1

Can you post the code?

Revision history for this message
Ben (benpersonal97) said :
#2

while True:
Try:
#code goes here
Except:
X=1
On Tue, 10 Nov 2015 at 02:22, Eugene S <email address hidden>
wrote:

> Your question #273986 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/273986
>
> Status: Open => Needs information
>
> Eugene S requested more information:
> Can you post the code?
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/sikuli/+question/273986
>
> You received this question notification because you asked the question.
>

Revision history for this message
Eugene S (shragovich) said :
#3

Tried Ctrl+C?

Revision history for this message
masuo (masuo-ohara) said :
#4

When you type [alt + shift + c], the script does not stop?
If so, try to add exit() in block 'except:' .
I might don't understand the issue .

while True:
    try:
        #code goes here
    except:
        X = 1
        exit() # add here

Can you help with this problem?

Provide an answer of your own, or ask Ben for more information if necessary.

To post a message you must log in.