Hi everyone i'm french sorry if you don't understand

I want make a bhop script with while(1) loop infinite and if spacebare is press then jump i send my source code
Code:
#include <stdio.h>
#include <windows.h>

int main(void)
{
	HWND hWnd = FindWindow(NULL, "Counter-Strike: Global Offensive"); /*P1 = nom de class, P2 = Titre de la fenetre rechercher*/
	
	if(hWnd == NULL) /*Si csgo est pas lancer*/
	{
		printf("Fenetre fermer\n");
	}
	else
	{
		SetForegroundWindow(hWnd);
		printf("Counter-Strike: Global Offensive status : Ouvert\n");
		
		printf("BHOP SCRIPT LANCER ! AMUSER VOUS BIEN !\n");
		
		while(1)
		{
			if(GetAsyncKeyState(VK_SPACE))/*Si la touche VK_SPACE (barre d'espace) est pressé*/
			{
				printf("La touche espace est enfoncer !\n");
				PostMessage(hWnd, WM_KEYDOWN, VK_SPACE, 0);
			}
			PostMessage(hWnd, WM_KEYUP, VK_SPACE, 0);
			Sleep(1000);
		}
	}
	return 0;
}
Need help for simulate a jump plz ...