Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Pause a script and wait for user input

Pause a script and wait for user input

Pause a script and wait for user input

Paint Shop Pro version 8 is out. They have a recorder that records steps and uses Python to record the steps. I'm wondering if there is a way to pause a script and wait for a user to press a key to continue.


RE: Pause a script and wait for user input


From the Python Library reference:
If the prompt argument is present, it is written to standard output without a trailing newline. The function then reads a line from input, converts it to a string (stripping a trailing newline), and returns that. When EOF is read, EOFError is raised. Example:

>>> s = raw_input('--> ')
--> Monty Python's Flying Circus
>>> s
"Monty Python's Flying Circus"

If the readline module was loaded, then raw_input() will use it to provide elaborate line editing and history features.

Good Luck.

John Purser

RE: Pause a script and wait for user input

Thank you for your reply. I have found a solution. I did look into raw_input, but couldn't get it to work.

What I wanted to do was ask for user input and then pass it on to a variable, or at least pause. Here is what I got to work.

Thanks for taking the time to respond.


    Result = App.Do( Environment, 'GetString', {
            'DefaultText': DefaultCaption,
            'DialogTitle': 'Text on a Path Generator',
            'Prompt': 'Enter your text.',
            'MaxLength': 40,
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Interactive,
                'AutoActionMode': App.Constants.AutoActionMode.Default
    if Result[ 'OKButton' ] == App.Constants.Boolean.false:

RE: Pause a script and wait for user input

Thank you for sharing the solution.

RE: Pause a script and wait for user input

Hi Sebsauvage,

Now that Paint Shop Pro has introduced Python scripting to the program I'll be posting in this forum more often. I know perl to some extent, well... I use it every work day, but still have a lot to learn.

Python seems cool. I wrote a script for Paint Shop Pro version 8 now out in Beta, that dynamically creates a vector shape and applies text to the path based on user input. It is so cool.

I write a lot of tutorials and author articles and books on Paint Shop Pro and am looking forward to lots more fun with Python and PSP.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close