; Find Column
; by djboo
; SHOWDEBUG

   WINDOW_CREATE somewin name=Find Column,width=375,height=495,state=normal,icon=someicon.ico
; TEXTFIELD_CREATE somewin handle=mytext,name=Stuff,x=15,y=15,width=100,height=25
  LISTBOX_CREATE somewin handle=mylist,jump=lstClicked,x=5,y=5,width=362,height=465
    IMAGE_CREATE somewin image=someimage.jpg,x=260,y=0

DEBUGOFF
HOSTACTIVATE
EXECOFF
SETACTIVESCREEN PATTERN
;ACTIVATE
;DEBUGTOFILE c:\pooptest.txt

;SETSTRING TC 0
;LABEL TAB
;KEY +{TAB}
;ADD TC 1
;COMPARE TC 17
;ISLESS TAB

;MTOFF

VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}
VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}
VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}
VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}
VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}
VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}
VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEF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EFT}{LEFT}{LEFT}{LEFT}
VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}

SETSTRING CT 0
SETSTRING PT 0
SETSTRING OCT 0
SETSTRING LASTPARAM
LABEL BACK
VBKEY {RIGHT}

; increase counter - if its above 4 (5) then the param has been the same for too long
; that must mean all have been checked


ADD 1 CT
COMPARE CT 4
ISGREATER END

GETPARAM
SETSTRING PNAME PARAM

; is the param different from the last one? if so, increase the pt, and store the param name

COMPARE PNAME LASTPARAM
ISEQUAL BACK

ADD 1 PT
SETARRAYPOINTER 1 PT 0
SETARRAY PNAME
SETSTRING LASTPARAM PNAME
SETSTRING CT 0
LISTBOX_ADDSTRING somewin handle=mylist,text=PNAME
GOTO BACK

LABEL END

;info PT

LABEL WinReturn
;findwindow test Find Column
;appactivate test

appactivate Find Column

IDLE WINDOWED

;SHOWDEBUG
ENDSCRIPT


LABEL cmdAdd
TEXTFIELD_GETSTRING somewin handle=mytext,destvariable=somevar
LISTBOX_ADDSTRING somewin handle=mylist,text=somevar
GOTO WinReturn

LABEL cmdRemove
TEXTFIELD_GETSTRING somewin handle=mytext,destvariable=somevar
LISTBOX_REMOVESTRING somewin handle=mylist,text=somevar
GOTO WinReturn

LABEL lstClicked
LISTBOX_GETSTRING somewin handle=mylist,destvariable=somevar
HOSTACTIVATE
SETACTIVESCREEN PATTERN
ACTIVATE
; info somevar

; -------------------------------------------------------------------------------------------

VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}
VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}
VBKEY {LEFT}{LEFT}{LEFT}{LEF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EFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}
VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}
VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}
VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}
VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}
VBKEY {LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}

LABEL nexrow
VBKEY {RIGHT}

GETPARAM
; info PARAM
COMPARE PARAM somevar
ISEQUAL bonus
GOTO nexrow
LABEL bonus

; INFO somevar
; -------------------------------------------------------------------------------------------

endscript
GOTO WinReturn