typeof Password2 = ObjText;; typeof Param2 = ObjText;; typeof Param3 = ObjText;; typeof List = [[S S S S] r1];; /* [ [Link text Param Nb] r1] */ typeof LinkCombo = ObjBox;; typeof oldPass = S;; typeof alias2 = ObjText ;; fun AddToCombo(List) = if List == nil then 0 else let hd List -> [link text _ _] in ( _ADDcombo LinkCombo 10000 text; AddToCombo tl List ) ;; fun ListofLink(ListParams) = if ListParams == nil then 1 else let hd ListParams -> el in ( let nth_list el 3 -> Param in let nth_list el 2 -> text in let nth_list el 1 -> nb in let hd el -> link in set List = [link text Param nb]::List; ListofLink (tl ListParams) ) ;; fun Search2 (List, n) = let List -> [link _ _ _] in !strcmp link n ;; fun Search (List, n) = let List -> [_ text _ _] in !strcmp text n ;; fun CallCombo (combo, paramU, Selnb, string) = let paramU -> [ win l] in let (search_in_list List @Search string) -> result in let result -> [_ _ param nb] in ( if (atoi nb)==1 then ( _DStext Param2; _DStext Param3; set Param3 = _CRtext _channel win 5 57 80 20 ET_ALIGN_LEFT param; set Param2 = _CReditLine _channel win 85 55 200 20 ET_ALIGN_LEFT|ET_DOWN|ET_AHSCROLL let getInfo l "param" -> string in if (nil == string) then "" else string ) else ( _DStext Param2; _DStext Param3; nil ) ) ;; fun closeedit() = let _GETcombo LinkCombo ->[_ n] in let (search_in_list List @Search n) -> result in let result -> [link _ _ _] in let _GETtext Password2 -> pass in if !strcmp pass "XXXXXXXXXX" then /*le mot de passe n'a pas change, on ne renvoie pas le champ password*/ strbuild ("gotPassword"::"1"::nil):: ("link"::link::nil):: ("param"::(_GETtext Param2)::nil):: ("alias"::(_GETtext alias2)::nil):: nil else if !strcmp pass "" then /*pas de mot de passe*/ strbuild ("link"::link::nil):: ("*password"::nil):: ("gotPassword"::nil):: ("param"::(_GETtext Param2)::nil):: ("alias"::(_GETtext alias2)::nil):: nil else /*un nouveau mot de passe*/ strbuild ("link"::link::nil):: ("*password"::(_getlongname pass "" "#")::nil):: ("gotPassword"::"1"::nil):: ("param"::(_GETtext Param2)::nil):: ("alias"::(_GETtext alias2)::nil):: nil ;; fun dynamicedit(win, obj, mat, param) = let PLUGparams thisplug -> ListParams in ( set List = nil; ListofLink ListParams ); let strextr param -> l in let _GETwindowSizePosition win -> [w h x y] in ( _CRtext _channel win 5 7 80 20 ET_ALIGN_LEFT _loc this "LINK_LIEN" nil; _CRtext _channel win 5 82 80 20 ET_ALIGN_LEFT _loc this "LINK_ALIAS" nil; set alias2 = _CReditLine _channel win 85 80 200 20 ET_ALIGN_LEFT|ET_DOWN|ET_AHSCROLL let getInfo l "alias" -> string in if (nil == string) then "" else string; set LinkCombo = _CRcombo _channel win 85 5 200 300 CB_DOWN nil; AddToCombo List; let getInfo l "link" -> myLink in let (search_in_list List @Search2 myLink) -> result in let result -> [link text param nb] in ( _SSELcombo LinkCombo text; if (atoi nb)==1 then ( set Param3 = _CRtext _channel win 5 57 80 20 ET_ALIGN_LEFT param; set Param2 = _CReditLine _channel win 85 55 200 20 ET_ALIGN_LEFT|ET_DOWN|ET_AHSCROLL let getInfo l "param" -> string in if (nil == string) then "" else string ) else ( _DStext Param2; _DStext Param3; nil ) ); _CRtext _channel win 5 32 80 20 ET_ALIGN_LEFT _loc this "LINK_PASS" nil; set Password2 = _CReditLine _channel win 85 30 200 20 ET_ALIGN_LEFT|ET_DOWN|ET_PASSWORD if nil == getInfo l "gotPassword" then "" else "XXXXXXXXXX"; _CBcombo LinkCombo @CallCombo [win l]; _CRtext _channel win 5 /*160*/ 120 800 140 ET_ALIGN_LEFT _loc this "LINK_EXPLICATION" nil ; /* _CRtext _channel win 5 180 800 20 ET_ALIGN_LEFT _loc this "LINK_PARAM1" nil ; _CRtext _channel win 5 200 800 20 ET_ALIGN_LEFT _loc this "LINK_PARAM2" nil ; _CRtext _channel win 5 220 800 20 ET_ALIGN_LEFT _loc this "LINK_PARAM3" nil ; _CRtext _channel win 5 240 800 20 ET_ALIGN_LEFT _loc this "LINK_PARAM4" nil ; */ ); @closeedit ;;