Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

What is the Python command for input in EG?

If you have a question or need help, this is the place to be.
Post Reply
eli2k
Posts: 26
Joined: Mon Jun 29, 2009 10:34 pm

What is the Python command for input in EG?

Post by eli2k »

I read in the changelog that "Replaced Python's built-in input() and raw_input() with a function that shows a simple input dialog." But it didn't indicate what is the function for capturing user input. The normal input() returns an error.

Thanks,
- Eli
setup: windows 7 + EventGhost 0.5.0-rc4 + Intel nuc6i5syh
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: What is the Python command for input in EG?

Post by Pako »

Try this example:

Code: Select all

myVariable = eg.SimpleInputDialog.RawInput('Enter some string...')
print myVariable
Pako
eli2k
Posts: 26
Joined: Mon Jun 29, 2009 10:34 pm

Re: What is the Python command for input in EG?

Post by eli2k »

Thanks, Pako. That code works perfectly!
setup: windows 7 + EventGhost 0.5.0-rc4 + Intel nuc6i5syh
Post Reply