furmiga
asked on
How to press a key self ?
Well... this is not the if KeyPress thing..... Its like When whatever = whatever Press the Key :)
I really dont know if its possible what i need is:
A Delphi Program that see what other program( a full screen one ) do - done
When whatever = whatever ( at the Delphi program ) the Delphi program will press the key "1" i.e
Of corse that the Delphi program is running behind the main program so the "1" key will affect the main program.
Well... thats it. Damn my english sux ( i am brazilian ) Sorry guys.....
I really dont know if its possible what i need is:
A Delphi Program that see what other program( a full screen one ) do - done
When whatever = whatever ( at the Delphi program ) the Delphi program will press the key "1" i.e
Of corse that the Delphi program is running behind the main program so the "1" key will affect the main program.
Well... thats it. Damn my english sux ( i am brazilian ) Sorry guys.....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Forget about it... i made it ! Thx for the comment i ll acept.
Hi, I think you have to write a Windows Hook function and install it on system so that hook function can monitor every key pressed in any program. Read Delphi Win32 API help, look for following function and read it carefully.
1. SetWindowHookEx
2. CallNextHookEx
3. UnHookWindowsHookEx
1. SetWindowHookEx
2. CallNextHookEx
3. UnHookWindowsHookEx
ASKER
dunno if u r understanding me :)
i am using
if i1 < 110 then
begin
keybd_event( Ord('1'), MapvirtualKey( Ord('1'), 0), 0, 0 );
end;
Maybe cuz of the FullScreen stuff the program cant run or cant really press the key. dunno.