The following code should help. It works on most EPOS printers. More hardware specific code will do more fancy things.
procedure TFormMain.OpenDrawer;
var drawercode : String;
begin
drawercode :=#27+'p0'+#100+#100;
SendControlCode(drawercode);
end;
procedure TFormMain.SendControlCode(S...
Thanks for that. I will use it. However my original problem remains in that multiple documentcomplete2 events are triggered for every page. I believe the problem to be some HTML iframe tags. I created a seperate thread to loop and look for document completion, since leaving the loop in the...
Thanks for the help, but my problem is that in each case after triggering browser navigation, I need to do different actions.
Here's a peudo code example.
1) Cycle through grid rows.
2) For each row, navigate to a URL.
3) Parse the new page.
4) Navigate back.
5) Repeat for next row.
My...
I am using Delphi 5's Web Browser component to navigate a website.
I need to parse the HTML source of some web pages, but since my code and the web browser do not seem to work in synch, I cannot work on the HTML source immediately after issuing a browser.navigate command.
I tried using sleep /...
oops, missed that.
Ok, I adapted it to
TidTo := GetWindowThreadProcessId(Wnd, 0);
the second parameter is required. Tried to set it to Null but that is a Variant, whereas a pointer is expected.
Still can see no reason to why the following code does not work:
// Alt-&Tools menu item...
Closing screensaver application (written in Delphi 5) leaves icon on taskbar?? Clicking on it makes it disappear. If the screensaver is activated a number of times, these application buttons on the taskbar accumulate. Still, they disappear once you click on them.
Problem observed in both...
If sendmessage should work, why does the following code (apparently) do nothing?
sendmessage(Wnd,WM_KEYDOWN,VK_MENU,0);
sendmessage(Wnd,WM_CHAR,ORD('T'),0);
sendmessage(Wnd,WM_KEYUP,VK_MENU,0);
// &Globals
sendmessage(Wnd,WM_CHAR,ORD('G'),0);
---
Never heared of the...
Well, I need it because I want to learn and not simply use other people's code. May I outline that I appreciate your help though.
The current problem with my utility (http://www.downloadcounter.com/cgi-bin/download.pl?username=itsmalta&account=13)
is that with postmessage and keybd_event the...
MSDN says:
lParam
Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in the following table.
0-15
Specifies the repeat count for the current message. The value is the number of times the keystroke...
I tried replacing sendmessage with postmessage in my previous code, but it made no difference. It still will not work.
What is the scancode in LPARAM for? In most of the examples I cam across it is set to zero.
whosrdaddy according to your code, if I am sending a keystroke mapping the 'T'...
Thanks for helping out.
Questions:
How do I use this to
1) hold down the ALT key
2) send a period as in filename.txt
3) and press the Return key
Your code uses the postmessage routine.
I am running a timer component which triggers every second and checks for open windows. If these are...
I replaced code as follows, however the sendkeys command is having no effect whatsoever. I am certain that the Wnd application handle is correct.
procedure OpenMessagesMenuItem(Wnd: Hwnd);
//----------------------------------------------------------------------]]
begin
if (Wnd <> 0) then...
From within my applications I need to check if another application is loaded.
I tried the enum EnumWindows() API and the FindWindow API.
I set up a chronometer within the code and the results I got are that FindWindow takes 64ms to complete and EnumWindows() takes 0 ms to complete. How can...
Your suggestion should remove the need to create intentional delays (waith n no of milliseconds) before sending more commands. Am I right?
Thanks for your help.
In a utility I am writing, I carry out the following steps
1) I enumerate windows
2) Bring to the front and send keystrokes to windows matching given criteria
3) Resize and repositition said windows.
I have observed that my utility actually makes a mess, with keystrokes being sent/processed...
I am creating a small utility to manage the windows of another application.
I set a timer to enumerate the windows. I must do this a number of times because a number of steps are involved. Let us call this other applicaton GM. Here's the pseudo code:
Check if the main window of GM is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.