|
Hi lnxmj,& {/ E( c4 z o$ }3 j! m' t
' p6 Y0 y" f) _ ^
既然你懂SKILL,那就請自己參考以下的SKILL code,應該就會找到你要的答案。當然,你該看的懂要改哪裡。有進一步問題,我們再討論看看。
$ z% t# K# t0 _6 `1 m, X( B0 X
$ D7 R X/ E! W( kHope this help,
, l% \! x9 V0 U' {' aVeteran
2 \; f' }. R0 F& j& E6 [/ f6 w! l q i1 G2 E# k- o' W
======================================================================================) Q& `9 \2 I" e7 H# |2 S
/* This is code to help user quickly set a bindkey for their specific Via by setting row to 2. It combines three actions.
+ c( }1 a$ `% N! D# k! {( X( {; n, x1. Invoke "Create->Contact" function.
. q5 i5 L! N1 {' A- G3 w0 b% p% O4 y2. Pick one specific via type.
# Y1 W6 e% c( C( k3. Set row to 2.
! l" \ E0 J& b( g. lOf course, you can modify the code to fit your environment, ex which via, ex row value, ex which bindkey. And you can also follow the same syntax to add more via you want to use. The following example is to set for 2 kind of Vias, M2_M1 and M3_M2. And the bindey is "1" for M2_M1, "2" for M3_M2.
/ a! C; | a1 O# n
M g- W8 ?( j$ i( MHow to use it?& s2 V, {) f( A" R- H
1) Load this code.
; I! c/ R: Q3 j1 K' J( |2) Press your bindkey to invoke such function.
0 z, }& y) F. h& i9 P7 n/ |) H*/
: U) k* d( K$ Y, B7 b. ], j* c! p% a. H; f% A/ s( Y: g1 t
procedure(CCSRegProc(args)
/ B* D: ~5 z D% _& M9 K args
$ w8 r- y! f' e; k' t$ Y" D$ T% e3 ]) Q& |% W( ~
/* Check if the callback for contactType field is present
2 D2 Y# h4 f8 ~$ l3 J) ^4 lBy default there is no callback */% C' _8 g+ y) t u
8 c1 G$ u$ l. A) ^% ?9 A unless(boundp('le0ContactForm)9 G( B# k; n' i7 z: x; n
hiRegTimer("CCScancel()" 1)
! C0 O- n. B9 p- { leHiCreateContact()6 a9 Z% L+ U- U- l7 t4 d
) ;unless
& y% u [& _" ]8 }) ;proc
+ F S/ Z7 q" ?/ k6 J: {7 }# l9 A$ b. t" \% Q k$ ^+ U$ ]
procedure(CCScancel()
7 g* u/ t6 z* I1 z6 O* v& F hiFormCancel(le0ContactForm). O" u7 G" e! `' [
cancelEnterFun(le0ContactForm)! [/ s/ C2 Q5 U, w4 j! d
) ;proc w( T" c6 k' F4 {! Q
# K; V1 K, b; i
+ I/ [% \* N m w( l6 C# O
procedure(creatCont_via21_2x1()# p2 U4 ~: Q: z. N
hiRegTimer("le0ContactForm->contactType->value =\"M2_M1\"" 2)
+ d' i6 `5 S0 a hiRegTimer("le0ContactForm->rows->value = 2" 5)
8 i+ M, t7 T, |% ` unless(hiIsFormDisplayed(le0ContactForm) leHiCreateContact())
# |2 @* _- V9 k$ e& x9 L);end procedure* N1 J: |8 V, p& _9 a* [
hiSetBindKey("Layout" "<Key>1" "creatCont_via21_2x1()" ). [' [7 X- @. D. D& N
: I9 h$ S' ~7 e& E) t& s Z
) z! \: a" U3 N6 Y* Rprocedure(creatCont_via32_2x1()
0 h3 M. }7 U9 X: t& O hiRegTimer("le0ContactForm->contactType->value =\"M3_M2\"" 2)$ e" L: d6 I, |* v1 J/ V. Y* b
hiRegTimer("le0ContactForm->rows->value = 2" 5)9 l% p6 B% }& b8 `
unless(hiIsFormDisplayed(le0ContactForm) leHiCreateContact())* c$ i* [/ d: P X4 t8 D* [- |' E
);end procedure
& h, W' v4 d* w! v6 ChiSetBindKey("Layout" "<Key>2" "creatCont_via32_2x1()" )
8 _* F4 c) t( B! _2 x0 K* r" L" C: T( H4 d* r; R3 a* F
;;you can add more Via like above from here. |
|