does anyone know how to do the program that are more or less like peteranswers??

This is the website which has been using to trick people...
http://www.peteranswers.com/

and this is the secret :
http://chriswondra.com/2007/02/21/peter-answers-the-secret/

i'm just wondering if i'm capable to do just a simple program that is similar like this?
and how to do this if i could?

thank you 4 answering...

Dani AI

Generated

Several replies already covered the essentials. was right that the original page is a client-side trick and is useful to read for learning; and posted offline builds, and mentioned a C++ version. Conceptually the program is simple: accept two kinds of input (an operator-supplied answer and an audience-supplied question), store the operator answer, then present that stored text when the audience submits a question. The real engineering work is the on-stage UX — keeping operator input invisible while the audience thinks they are typing the whole question.

A minimal console pattern that keeps the operator path separate uses a short prefix to set the answer and then consumes it on the next audience submission. Example:

#include <iostream>
#include <string>

int main() {
    std::string operatorAnswer;
    std::string line;
    while (std::getline(std::cin, line)) {
        if (!line.empty() && line[0] == ':') {          // operator sets answer with ":" prefix
            operatorAnswer = line.substr(1);
            std::cout << "[operator answer stored]\n";
            continue;
        }
        if (!operatorAnswer.empty()) {                  // audience asks; program responds
            std::cout << "Peter: " << operatorAnswer << "\n";
            operatorAnswer.clear();                     // one-time reveal
        } else {
            std::cout << "Peter: I don't know.\n";
        }
    }
    return 0;
}

For a GUI version prefer a single-process approach: embed a hidden text control or dedicated operator widget (Qt or native Win32) so focus stays predictable. Avoid global keyboard hooks unless absolutely necessary — they require extra privileges and can trigger antivirus. As noted, share source instead of only an exe so others can learn; test focus/clipboard edge cases and document exactly how the operator workflow runs. Finally, use the trick responsibly and do not distribute code that hides malicious behavior.

Recommended Answers

All 5 Replies

does anyone know how to do the program that are more or less like peteranswers??

This is the website which has been using to trick people...
http://www.peteranswers.com/

and this is the secret :
http://chriswondra.com/2007/02/21/peter-answers-the-secret/

i'm just wondering if i'm capable to do just a simple program that is similar like this?
and how to do this if i could?

thank you 4 answering...

Not very difficult. It's far harder to pull off the trick as the person typing in the question.

But you're in the wrong forum. It's definitely not C++. Go to "View Page Source" and you'll see that it's in Javascript and hence you'll see the full source code, or at least the full source code minus any imported scripts. It's been a while since I've played with Javascript, but since it's client-side, you can download the whole page and turn off your internet connection and successfully run it locally on your machine, so you have the full source code, so you can pick it apart. If you have questions, ask in the JavaScript section.

You could certainly also write this as a non-web-based application in C++.

It is possible to make an offline version of Peter Answers. I have done it, but I used Visual Basic not C++. I don't know anything about C++, but you can take a look at my program at: http://www.jonas-homepage.orgfree.com/jonas-answers.php. For the code you can e-mail me at <<snip>>

its easy ive made this program 2 years before in c++.... i will have to find it again and i will post u that ...
give me ur email address

here is an offline version I made it using c#

I see exe files, but no code. This is a programming forum. Are you going to share the code?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.