Click here to Skip to main content
15,892,537 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 0:53
CodeWraith18-Nov-19 0:53 
QuestionIs there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M15-Nov-19 22:44
professionalJoan M15-Nov-19 22:44 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
User 1106097915-Nov-19 23:54
User 1106097915-Nov-19 23:54 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M16-Nov-19 0:20
professionalJoan M16-Nov-19 0:20 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
User 1106097916-Nov-19 0:45
User 1106097916-Nov-19 0:45 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M16-Nov-19 1:12
professionalJoan M16-Nov-19 1:12 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
User 1106097916-Nov-19 1:23
User 1106097916-Nov-19 1:23 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M16-Nov-19 2:53
professionalJoan M16-Nov-19 2:53 
Have not seen how to post it in your blog...

Hope you don't mind I post it here:
C++
#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
User 1106097916-Nov-19 6:09
User 1106097916-Nov-19 6:09 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M16-Nov-19 9:30
professionalJoan M16-Nov-19 9:30 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
User 1106097916-Nov-19 9:36
User 1106097916-Nov-19 9:36 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Jacquers16-Nov-19 4:23
Jacquers16-Nov-19 4:23 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
PIEBALDconsult16-Nov-19 5:02
mvePIEBALDconsult16-Nov-19 5:02 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M16-Nov-19 9:26
professionalJoan M16-Nov-19 9:26 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Daniel Pfeffer16-Nov-19 8:27
professionalDaniel Pfeffer16-Nov-19 8:27 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M16-Nov-19 9:24
professionalJoan M16-Nov-19 9:24 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
milo-xml18-Nov-19 9:24
professionalmilo-xml18-Nov-19 9:24 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M19-Nov-19 6:39
professionalJoan M19-Nov-19 6:39 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Member 916705718-Nov-19 20:56
Member 916705718-Nov-19 20:56 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M19-Nov-19 6:39
professionalJoan M19-Nov-19 6:39 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Gregori Harbs19-Nov-19 3:57
Gregori Harbs19-Nov-19 3:57 
GeneralRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Joan M19-Nov-19 6:40
professionalJoan M19-Nov-19 6:40 
AnswerRe: Is there any program out there that can close messageboxes pressing enter automatically? (in windows XP) Pin
Member 986675520-Nov-19 6:29
Member 986675520-Nov-19 6:29 
Generalsometimes i wish PinPopular
honey the codewitch15-Nov-19 21:05
mvahoney the codewitch15-Nov-19 21:05 
GeneralRe: sometimes i wish Pin
RickZeeland15-Nov-19 21:16
mveRickZeeland15-Nov-19 21: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.