Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excel to CRM software Data Entry Issue
#1
Greetings,

I am trying to integrate data entry from excel into a CRM software.
The data entry window in the CRm is a grid window that identifies as a client of accessible object type.
However, I am unable to get QM to recognize the individual cells in the grid.
What I do is, I make QM click on the scroll bar, which automatically selects the first cell of the grid.
Then I use the get windows method to scroll through the first coloum down to obtain the sales advisor name code.
Each sales person has 2 categories "L" and "J" (Fran)
When I key left in QM, it goes to the left cell.
Now how do I check the value in that cell?

Kindly refer to the screen shot attached of the CRM window.
Below is the code thus far.


Macro Incentive Figures
Code:
Copy      Help
ExcelSheet es.Init
ARRAY(str) arrName, figure
int w1, w2, c, r
str range2, name
WindowText wt

str varRep ;;string variable. If need numeric, replace str to int or double.
inp- varRep "Obtains from the user the number of times to repeat this procedure"

rep varRep
,w1=act(win("Microsoft Excel - " "XLMAIN"))
,;act w1
,'D     ;; Down
,
,;get selected cells in Excel
,es.GetRangeInfo("<sel>" c r)
,range2.from("R",r)
,es.SelectCell(range2)
,es.CellsToArray(arrName "sel")
,es.SelectCell(c r)
,es.CellsToArray(figure "sel")
,name=arrName
,
,int w=win("Maintain vehicle salemen targets and their incentive parameters " "KCMLMasterForm_32")
,Acc a.Find(w "INDICATOR" "Position" "class=ScrollBar[]id=102" 0x1025)
,a.Mouse(1)
,
,;findSA
,opt slowkeys 0; spe 1
,rep 1000
,,wt.Init(w2)
,,wt.Mouse(4 wt.Find(name))
,,err
,,,'D        ;; Down
,,,continue
,,break
,opt slowkeys 1; spe 70
,
,'L
,int w3=win("Maintain vehicle salemen targets and their incentive parameters - Al Tayer - JLR (pjacob/161)" "KCMLMasterForm_32")
,Acc a1.Find(w3 "CLIENT" "" "class=KCMLGridPad_32[]id=100" 0x1004)


Attached Files Image(s)
   
Best Regards,
Philip
#2
Can someone assist in this topic please.
Hi Gintaras, kindly consider.

Thanks,
Philip
Best Regards,
Philip
#3
Macro Macro2475
Code:
Copy      Help
str name
WindowText wt
;...
;wt.Mouse(4 wt.Find(name))
;;replace to
WTI* cell=wt.Find(name)
;wt.Mouse(4 cell) ;;if need
out cell.txt
#4
Hi Gintaras,

Thanks, that worked in finding name of sales advisor.
But how do I check the value on the adjacent right cell to the found cell.

Thanks,
Philip
Best Regards,
Philip
#5
Member function WindowText.GetNextWti
Code:
Copy      Help
function'WTI* WTI*t indexDiff

;Gets another text item.
;Returns address of internal variable that contains item properties.

;t - a text item. Usually it is the value returned by Find.
;indexDiff - index of item to get minus index of item t.
;;;For example, if index of t is 5, and indexDiff is 1, this function gets item 6. If indexDiff is -1, gets item 4.
;;;To see item indices, in dialog "Window Text" click Test next to Select.

;EXAMPLE
;int w=win("Calculator" "CalcFrame")
;WindowText wt.Init(w)
;WTI* t=wt.Find("5" 0x1001)
;t=wt.GetNextWti(t 1)
;wt.Mouse(0 t)


t+indexDiff*sizeof(WTI)
if(t<a or t>=a+(n*sizeof(WTI))) end ERR_BADARG
ret t
#6
Thanks Gintaras, that worked.
Best Regards,
Philip


Forum Jump:


Users browsing this thread: 1 Guest(s)