I'm automating a software using SendKeys.
The s/w is executed in my Delphi 7 code by CreateProcess.
The first time I want to sendkeys, I get the window handle by a title search.
Then I use than handle subsequently.
Everything works like it should but sometimes, typically when sending...
I have a Delphi program, A, which runs another Delphi program, B, using CreateProcess (or ShellExecute)
The return code from CreateProcess merely indicates whether the process was successfully created so it is useless when trying to RAISE ERRORS.
The only way I can think of doing it is to have...
I thought I was doing this properly over the years but just realized I'm doing it wrong when I was losing an Out of Bounds OS exception.
My general approach when I write code is to encapsulate every routine with a T/E and append the E.messages so that I get a Traceback list of the calling...
I have 2 XL files: one with Data (call it A), another that uses it (call it B).
File A is named ^rut.csv and has one sheet named ^rut. It is open when B is opened.
A is a table of data where DATE in the first column is LOOKed UP.
The following works:
In B, Cell R3C4 defines the A...
I know you can name a column, but that is basically naming a range.
Is there any way to rename the column "name", i.e. A,B,C,... etc?
Because
Columns are usually variable names, and
Rows are usually indices
Example:
R12 = A1 + B2*C17*FF37
has absolutely no intuitive meaning.
But the...
Sounds complicated but I want to use this cell formula which references another file, ^rut.csv.
=VLOOKUP(RC3,'^rut.csv'!R1C1:R6163C7,2,FALSE)
Cell A1 has a value of ^rut
I've tried replacing the '^rut in the formula with
1) A1 & '
2) 'A1' & '
Doesn't work.
I've tried replacing the entire...
This post is an act of DESPERATION.
This is code I have written and used for years and now, out of the blue, I cannot open an existing XL file.
The code is the traditional:
Excel: = CreateOleObject (' excel.application ');
...
Excel. Workbooks. Open (LongFileName1);
...
Excel. Workbooks...
Frankly, I don't think this can be done. First, I've looked a lot simply for an example and have not found one.
In fact, I've seen this trick:
var
Sheets: Variant;
begin
XLApp.Workbooks[1].Sheets.Add(,,1,xlChart);
Sheets := XLApp.Sheets...
The chart is the supplied candlestick stock chart.
I created a text box which I wanted to move with a particular candlestick high. This is how I did it:
1) Create the text box and copy.
2) Select the "Hi" series and then the particular candlestick, i.e. point.
3) Then Paste.
The TB moves...
I have code where in the main UNIT, I test for various problems and if I find one that I expect, I CREATE my own EXCEPTION and RAISE it:
type
EFatalError = class (Exception);
.....
RAISE eFatalError.Create ('helpful message');
This works great and I get a helpful message explaining what...
I have a number of non-GUI style programs (engineering programs for research) where I want to maintain a "console memo," a memo used by all Procedures in all Units to log various information such as intermediate results, progress, etc.
I was thinking of a U_Console unit which would have the...
For the past 3+ years, I have successfully closed XL automation processes with the following last 4 lines of code.
Now, the process won't close.
Any thoughts?
Thanks in advance.
Tom
PC, WinXPpro, Delphi 7:
TYPE
XLap : OLEvariant; // Original Code
...
BEGIN
XLap :=...
Delphi 7.
If I uncheck Access Violation in Debugger Options, I don't get the error.
Checked this issue on other machines in office and they DO NOT behave this way.
The code that does this is a new Project1 where I merely add ComObj or Excelxx to the USES, then hit the green triangle run...
At work, we had a network of workstations to run finite element jobs. You submit the job, it goes into a queue, and then is executed on a specific machine based on memory and drive requirements.
I want to build the same type of system, but a rudimentary as possible.
Let's call one a Queue...
I just moved into my new m35x-s111 Toshiba laptop (from a 1115-s111 Toshiba laptop!) and much to my amazement, none of the Gexpert CTRL+ALT+... commands do not work.
When I try them, nothing happens.
CTRL+ALT+DEL works on this laptop.
It is a standard 101/102 keyboard with some multimedia...
I have a Delphi program, A, which uses CreateProcess to call another Delphi program, B.
If B bombs or is terminated to an error I RAISE, A does not see this.
First, the Boolean CreateProcess is of no use because this just reports the success of CreateProcess.
Now, GetExitCodeProcess seems to...
The following code works perfectly if I use 2 different PROCEDURE names and no OVERLOADing.
When I attempt the OVERLOAD, I get the error,
"There is no overloaded version of 'AssignPcode' that can be called with these arguments."
Here is the code:
unit U_overload;
interface
uses
Windows...
Works great from executable, but hangs in IDE.
I have a couple of programs that use ShellExecute and they all hang in the debugger.
Any suggestions?
Thanks
Tom
I am automating a backtest algorithm that uses the NeuroShell 2 Batch Processor.
I use CreateProcess to execute it, and then WaitForInputIdle to wait for the appropriate steps requiring keystroke input via SendKeys.
I have 2 problems:
1) WaitForInputIdle and even Application.ProcessMessages...
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.