Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <windows.h>
- using namespace std;
- void Y();
- void Z();
- void Backspace();
- bool potw = false,potw2= false;
- int main()
- {
- cout<<"Witam was kochane politechy!!!"<<endl;
- cout<<"Teraz wasze Z to Y i wasze Y to Z Zostawcie ten program wlaczony"<<endl;
- while(1)
- {
- if(GetAsyncKeyState('Y') && potw2==true)
- {
- if( potw == true)
- {
- potw = false;
- Backspace();
- Z();
- }
- }
- else
- potw=true;
- if(GetAsyncKeyState('Z') && potw==true)
- {
- if( potw2 == true)
- {
- potw2=false;
- Backspace();
- Y();
- }
- }
- else
- potw2 = true;
- }
- return 0;
- }
- void Backspace()
- {
- keybd_event( VK_BACK,0x45,KEYEVENTF_EXTENDEDKEY | 0, 0 );
- keybd_event( VK_BACK,0x45,KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,0);
- }
- void Y()
- {
- keybd_event( 0x59,0x45,KEYEVENTF_EXTENDEDKEY | 0, 0 );
- keybd_event( 0x59,0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
- }
- void Z()
- {
- keybd_event( 0x5A,0x45,KEYEVENTF_EXTENDEDKEY | 0, 0 );
- keybd_event( 0x5A,0x45,KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement