[HELP]C++ Sending text to command line menu

Shout-Out

User Tag List

Results 1 to 5 of 5
  1. #1
    xyfz's Avatar Private
    Reputation
    1
    Join Date
    Oct 2012
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [HELP]C++ Sending text to command line

    Hey,

    Yesterday I tried to send text to another window in c++.

    Worked fine with notepad, but when I'm trying to send the text to a command line its not working. It doesn't write anything.

    I use this code:


    Code:
    SetForegroundWindow((HWND)hWnd);
    SendMessage(FindWindowEx((HWND)hWnd, NULL, "Edit", NULL), WM_SETTEXT, 0, (LPARAM)strcat(message, dbName));

    (message) is my variable for some defined text and (dbName) is text from a user input stored in a variable

    Like I said, it works in notepad, but not in command line.

    Hope u can understand my English and someone can help me

    Thanks in advance.

    [HELP]C++ Sending text to command line
  2. #2
    Cromon's Avatar Legendary


    Reputation
    840
    Join Date
    Mar 2008
    Posts
    714
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you wanna achieve? That some text is printed in the console? Or what kind of command line? WM_SETTEXT changes the caption of a window. What the caption is depends on the class of the window/control, for example for a frame its the title, for a textbox its the content, and so on.

  3. #3
    xyfz's Avatar Private
    Reputation
    1
    Join Date
    Oct 2012
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cromon View Post
    What do you wanna achieve? That some text is printed in the console?
    Yes, exactly.

    So what code do I need to write in a console?

    Could you please give me an example?

  4. #4
    Cromon's Avatar Legendary


    Reputation
    840
    Join Date
    Mar 2008
    Posts
    714
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats the function you are looking for:
    AttachConsole

  5. #5
    xyfz's Avatar Private
    Reputation
    1
    Join Date
    Oct 2012
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll try it out when I'm home.

    Thanks so far

Similar Threads

  1. Sending HB Hotkey Commands from AHK GUI [WILL PAY FOR HELP]
    By lostinthewoodslol in forum WoW Bot Maps And Profiles
    Replies: 0
    Last Post: 06-28-2016, 09:59 PM
  2. (Help) MySQL command line
    By Insignia in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 07-29-2008, 09:25 PM
  3. [Help]Can someone fix this mysql line for me.
    By Kiev in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 01-13-2008, 08:14 AM
  4. Need help GM levels And changing commands will +rep
    By crazyc in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 11-30-2007, 01:11 PM
  5. MySQL Command Line Client PROBLEM HERE!!!
    By heijheija in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 08-31-2007, 08:19 AM
All times are GMT -5. The time now is 07:42 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search