Search found 800 matches

by Tonton Luc
16 Jan 2018 10:29
Forum: Visual Prolog
Topic: How to convert a safeArray ?
Replies: 2
Views: 1179

Re: How to convert a safeArray ?

Thanks for your help. My code work fine now : % with Selection = "D4:F6" Values == Selection:getProperty("Value"), if Values = comDomains::safeArray(SA) then Array = safeArrayVariant::newCopy(SA), Nb_array = Array:getBoundaries(), % [boundary(2,1),boundary(2,1)] Prem = Array:getValue([3,3]), % retur...
by Tonton Luc
15 Jan 2018 16:57
Forum: Visual Prolog
Topic: How to convert a safeArray ?
Replies: 2
Views: 1179

How to convert a safeArray ?

Hi,

When I recover the Range value in a Excel sheet Range("B6:E8") using comDispInterface::getProperty, I obtein a comDomains::safeArray variant.
How to convert it in string_list (or integer_list) ?
by Tonton Luc
15 Jan 2018 16:21
Forum: Visual Prolog
Topic: Mimic VBS code
Replies: 11
Views: 1624

Re: Mimic VBS code

Bingo !!! Works fine. Many many thanks for your help Thomas. Outputs2 = ApplicationExcell:invokeMethodWithOutput2("Range",[comdomains::in(comDomains::string("B6:E7"))]), stdio::writef("%\n", Outputs2), comDomains::iDispatch(IFind) == list::nth(0,Outputs2), CellSel = comDispInterface::new(IFind), Cel...
by Tonton Luc
15 Jan 2018 14:36
Forum: Visual Prolog
Topic: Mimic VBS code
Replies: 11
Views: 1624

Re: Mimic VBS code

I've tried this code without succes : Outputs2 = ApplicationExcell:invokeMethodWithOutput("Range",[comdomains::in(comDomains::string("B6"))]), ======================================== Dump: 2018/01/15 14:34:56 ---------------------------------------- Exception: disp_e_membernotfound_exception (com/v...
by Tonton Luc
15 Jan 2018 8:44
Forum: Visual Prolog
Topic: Mimic VBS code
Replies: 11
Views: 1624

Re: Mimic VBS code

Hi, All works fine now :D Many thanks for your help. Here is my code : class predicates getActiveObject : (comDomains::nativeClassId CLSID, pointer MustBeNull, iUnknown IUnknown [out]) -> hResult HResult language apicall. clauses onFileNew(_Source, _MenuTag):- CLSID = uncheckedConvert(comDomains::na...
by Tonton Luc
12 Jan 2018 13:24
Forum: Visual Prolog
Topic: Mimic VBS code
Replies: 11
Views: 1624

Re: Mimic VBS code

Hi Sorry, I did not see that you had indicated "Vip 8" in your first reply. I've try this code without success : XXX = uncheckedConvert(comDomains::nativeClassId,memory::allocAtomicHeap(sizeOfDomain(comDomains::nativeClassId))), CLSID = uncheckedConvert(pointer,XXX), R_clsid = com_native::cLSIDFromP...
by Tonton Luc
12 Jan 2018 11:49
Forum: Visual Prolog
Topic: Mimic VBS code
Replies: 11
Views: 1624

Re: Mimic VBS code

Hi, Many thanks for your help. I forget to indicate I use VP 7.3. So, I try to convert your code in VP 7.3 and I've an error. Here is my code : _R = com_native::cLSIDFromProgID("Excel.Application",CLSID), IApplicationExcell = uncheckedConvert(iDispatch, comCreation::createInstance(CLSID, iDispatch::...
by Tonton Luc
10 Jan 2018 14:32
Forum: Visual Prolog
Topic: Mimic VBS code
Replies: 11
Views: 1624

Mimic VBS code

Hi,

Is it possible to do the same in VP 7.3 ? :

Code: Select all

  Dim ApplicationExcel   Dim ClasseurExcel   Dim NumCol     Set ApplicationExcel = GetObject(,"Excel.Application")   Set ClasseurExcel = ApplicationExcel.ActiveWorkbook     NumCol = ClasseurExcel.Application.ActiveCell.Column
by Tonton Luc
21 Sep 2017 15:24
Forum: Visual Prolog
Topic: COM exception: Member not found
Replies: 5
Views: 2033

Hi,

What is the VP 7.3 corresponding syntaxe of the following code ?

Code: Select all

DispId = comDispInterface::getDispId(Name),
by Tonton Luc
19 Sep 2017 7:44
Forum: Visual Prolog
Topic: Excel COM : selecting a cell and recover sheet name
Replies: 0
Views: 359

Excel COM : selecting a cell and recover sheet name

Hi, Here is my following VP 7.3 code and all works fine. facts excel:comDispInterface:=erroneous. workbooks:comDispInterface:=erroneous. feuilles:comDispInterface:=erroneous. selection_excel:comDispInterface:=erroneous. cellule:comDispInterface:=erroneous. clauses onFileOpen(_Source, _MenuTag):- if ...
by Tonton Luc
31 Aug 2017 6:33
Forum: Visual Prolog
Topic: tableedControl
Replies: 10
Views: 599

Hi,

In tableedControl.i :

Code: Select all

tableedit_type = te_integer;    % INTEGER column type                  te_real;       % REAL column type                  te_long;       % INTEGER column type                  te_string;     % STRING column type (default: STRING column type)                  te_picture.    % picture column type
by Tonton Luc
14 Aug 2017 6:26
Forum: Visual Prolog
Topic: DDE Excel problem with cell's changing background color
Replies: 0
Views: 421

DDE Excel problem with cell's changing background color

Hi, I try to change cell's background color without success. The folowing code works fine with an old Excel but not with Excel 2013 : _ = vpiDde::execute(conv,"[PATTERNS(1,0,3)]",1000), % 3 = Red From time to time the background of the cell becomes black. I've found any documentation about it on the...
by Tonton Luc
11 Aug 2017 6:52
Forum: Visual Prolog
Topic: How to recover the contein of and editControl in form2 from an other form ?
Replies: 4
Views: 415

Hi,

Asserting the form in a class fact => it was what I'm looking for.
All works fine now.

Many thanks Thomas.
:wink:
by Tonton Luc
10 Aug 2017 14:20
Forum: Visual Prolog
Topic: How to recover the contein of and editControl in form2 from an other form ?
Replies: 4
Views: 415

Hummm... it's not clear for me.
I try to explain more.

From his onShow, the taskwin open the form1.

When the user click to the task menu, the taskwin display form2 and put it BringToTop (so form1 never closed).

I this case, how to obtein the contain of an editControl of form2 from form1 ?
by Tonton Luc
10 Aug 2017 10:57
Forum: Visual Prolog
Topic: How to recover the contein of and editControl in form2 from an other form ?
Replies: 4
Views: 415

How to recover the contein of and editControl in form2 from an other form ?

Hi,

Sorry, I don't remember how to do it.
Any sample ?

If my application have 2 forms (form1 + form2), and form2 have un editControl, how to recover the text of this editControl from a button in form1 ?