Welcome, Guest. Please Login.
IRobotSoft Robot
09/30/23 at 08:38:29
News: IRobotSoft is the Best Visual Web Computing Platform!
Home Help Search Login
Google
 


Pages: 1
Send Topic Print
OCX no output no errors (Read 4818 times)
RhoTu
IRobotSoft Newbies
*


I Love IRobotSoft

Posts: 10
OCX no output no errors
01/30/16 at 14:43:26
 
I have an irb that functions using the UI and using a cmd line.  Unfortunately both require UAC acknowledgment.  Since these are being fired off by an application I am developing using Delphi I thought I would try the OCX.  I was able to import the type_lib and generate a .pas unit.  when I run this simple example I get a zero return from run and all of the others indicating success but no log file or the expected csv file are generated.  I have checked all file and directory spellings and each is correct.  Any suggestions as to what I am doing wrong or missing?
 
procedure TForm1.btn1Click(Sender: TObject);
var
  irob:TIrobotX;
  i:integer;
begin
  irob:=TIrobotX.Create(nil);
  if iRob.setIrbFile('c:\Irobotsoft\Yahoo splits.irb','')<0 then
    showMessage('Failed setIRBfile');
  if iRob.setLogFile('C:\Hilltop Securities\downloads\irb.log',255)<0 then
    showMessage('Failed setLogFile');
  if irob.prepareRobot('c:\hilltop securities\downloads\')<0 then
    showMessage('Failed prepareRobot');
  i:=irob.run('YahooSplits',1);
  if i<0 then
    showMessage('Failed run')
  else
    showMessage('result: '+intToStr(i));
end;
Back to top
 
 
  IP Logged
RhoTu
IRobotSoft Newbies
*


I Love IRobotSoft

Posts: 10
Re: OCX no output no errors
Reply #1 - 01/30/16 at 15:07:29
 
Update:
 
Added the ocx as a component in Delphi and created an event handler for onCompleted.  No change.  Changed the run parameter to 0 and got a failed run: -1 and no firing of the onCompleted event.
 
procedure TForm1.btn1Click(Sender: TObject);
var
  i:integer;
begin
  if IrbtX1.setIrbFile('c:\IrbtX1otsoft\Yahoo splits.irb','')<0 then
    showMessage('Failed setIRBfile');
  if IrbtX1.setLogFile('C:\Hilltop Securities\downloads\irb.log',255)<0 then
    showMessage('Failed setLogFile');
  if IrbtX1.prepareRobot('c:\hilltop securities\downloads\')<0 then
    showMessage('Failed prepareRobot');
  i:=IrbtX1.run('YahooSplits',0);
  if i<0 then
    showMessage('Failed run: '+intToStr(i))
  else
    showMessage('result: '+intToStr(i));
end;
 
procedure TForm1.irbtx1Completed(Sender: TObject);
begin
  showMessage('completed');
end;
Back to top
 
 
  IP Logged
IRobotSoft Administrator
IRobotSoft Administrator
*****


IRobotSoft, the Best
Internet Robot
System

Posts: 1609
Gender: male
Re: OCX no output no errors
Reply #2 - 01/30/16 at 21:03:50
 
After setLogFile, you can also add IrbtX1.showBrowser(1) to show the browser and its action.  
 
Also, we are no longer actively maintain the OCX.  It is recommended to use command line or python htql to interact with irobot.  
 
Back to top
 
 

The Administrator.
WWW   IP Logged
RhoTu
IRobotSoft Newbies
*


I Love IRobotSoft

Posts: 10
Re: OCX no output no errors
Reply #3 - 02/01/16 at 13:13:20
 
Bummer, the ocx would have been easy to integrate into my application.  I guess I'll have to use the irbrun since I don't want to learn python.
Back to top
 
 
  IP Logged
IRobotSoft Administrator
IRobotSoft Administrator
*****


IRobotSoft, the Best
Internet Robot
System

Posts: 1609
Gender: male
Re: OCX no output no errors
Reply #4 - 02/01/16 at 13:58:17
 
The ocx becomes difficult to maintain because of window security issues.  
 
You can use the same command line parameters for either irobot.exe and irbrun.  The irbrun will not be able to run javascript on the pages.  
 
Back to top
 
 

The Administrator.
WWW   IP Logged
Pages: 1
Send Topic Print