Click here to Skip to main content
14,390,032 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: There are times when I like multiples in purchases, but ... Pin
CodeWraith18-Nov-19 1:53
MemberCodeWraith18-Nov-19 1:53 
QuestionIs there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M15-Nov-19 23:44
professionalJoan M15-Nov-19 23:44 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
0x01AA16-Nov-19 0:54
professional0x01AA16-Nov-19 0:54 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M16-Nov-19 1:20
professionalJoan M16-Nov-19 1:20 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
0x01AA16-Nov-19 1:45
professional0x01AA16-Nov-19 1:45 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M16-Nov-19 2:12
professionalJoan M16-Nov-19 2:12 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
0x01AA16-Nov-19 2:23
professional0x01AA16-Nov-19 2:23 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M16-Nov-19 3:53
professionalJoan M16-Nov-19 3:53 
Have not seen how to post it in your blog...

Hope you don't mind I post it here:
#include "pch.h"
#include <iostream>
#include <stdio.h>
#include <cstdlib>
#include <windows.h>
#include <winuser.h>
#include <conio.h>

int main(int argc, char *argv[])
{
	LPCTSTR windowName = "Pregunta";
	int ims = 10000;

	if (argc > 1)	windowName = argv[1];
	if (argc > 2)	ims = atoi(argv[2]);

	while (true)
	{
		HWND hHandle = ::FindWindow(NULL, windowName);
		std::cout << hHandle;
		std::cout << "\r\n";

		if (hHandle != NULL)
		{
			::PostMessage(hHandle, WM_KEYDOWN, VK_RETURN, 0x001C0001);
			::PostMessage(hHandle, WM_KEYDOWN, VK_DOWN, 0x00500001);
		}
		Sleep(ims);
	}
}
Thank you for taking time to do this! Beer | [beer]

PS: the compiler must not be set to unicode to accept this as valid.
www.robotecnik.com[^] - robots, CNC and PLC programming


modified 16-Nov-19 9:17am.

GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
0x01AA16-Nov-19 7:09
professional0x01AA16-Nov-19 7:09 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M16-Nov-19 10:30
professionalJoan M16-Nov-19 10:30 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
0x01AA16-Nov-19 10:36
professional0x01AA16-Nov-19 10:36 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Jacquers16-Nov-19 5:23
MemberJacquers16-Nov-19 5:23 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
PIEBALDconsult16-Nov-19 6:02
professionalPIEBALDconsult16-Nov-19 6:02 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M16-Nov-19 10:26
professionalJoan M16-Nov-19 10:26 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Daniel Pfeffer16-Nov-19 9:27
professionalDaniel Pfeffer16-Nov-19 9:27 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M16-Nov-19 10:24
professionalJoan M16-Nov-19 10:24 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
milo-xml18-Nov-19 10:24
professionalmilo-xml18-Nov-19 10:24 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M19-Nov-19 7:39
professionalJoan M19-Nov-19 7:39 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Member 916705718-Nov-19 21:56
MemberMember 916705718-Nov-19 21:56 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M19-Nov-19 7:39
professionalJoan M19-Nov-19 7:39 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Gregori Harbs19-Nov-19 4:57
MemberGregori Harbs19-Nov-19 4:57 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M19-Nov-19 7:40
professionalJoan M19-Nov-19 7:40 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Member 986675520-Nov-19 7:29
MemberMember 986675520-Nov-19 7:29 
Generalsometimes i wish Pin
honey the codewitch15-Nov-19 22:05
Memberhoney the codewitch15-Nov-19 22:05 
GeneralRe: sometimes i wish Pin
RickZeeland15-Nov-19 22:16
mveRickZeeland15-Nov-19 22:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.