in reply to Multiple API calls
Without seeing what ApiLink is, and where it comes from, it's hard to tell whether your code is correct. Where do you see problems?
I use and recommend Win32::API for interfacing with the Windows API. Avoid the "prototype" variant of the API and use the "parameter list" variant, as the C parser for the "prototype" variant has given me too much grief.
You seem to have taken some VB code and pasted it all in between calls to ApiLink() - I don't understand what this is. The Win32::API documentation does not mention ApiLink() or any way to run VB code.
For screen grabbing, take a look at Win32::GuiTest and Win32::GuiRobot. Interfacing with the Windows API also isn't hard, but the code you show only declares one Windows API function to call, keybd_event. I would try the following to call it:
use Win32::API; my $_keybd_event = Win32::API->new( 'user32.dll', 'keybd_event', 'IIII', 'I', ); sub keybd_event { my ($vk,$scan,$flags,$extra_info) = @_; $_keybd_event->Call($vk,$scan,$flags,$extra_info); };
|
|---|