|
Hi lnxmj,
9 u' T: y# ?9 Y: C8 ]# n- t9 M5 J4 @1 h2 `
既然你懂SKILL,那就請自己參考以下的SKILL code,應該就會找到你要的答案。當然,你該看的懂要改哪裡。有進一步問題,我們再討論看看。& {7 x; ], s. Z1 c$ H. A
0 z3 u, [: R3 v- g8 w* EHope this help,3 C, ^ q% n) k2 O/ \# h& E _
Veteran9 O1 H6 P' Q' j4 m- E: ~( o
# o+ Q7 [1 z, S% E- S$ @======================================================================================
0 d+ l7 @& i2 n6 c! c: M% ~8 k/* This is code to help user quickly set a bindkey for their specific Via by setting row to 2. It combines three actions.0 F) `' S% t- a' K* z! r' o* I/ p
1. Invoke "Create->Contact" function.8 w+ ^6 [# L! C3 z6 _1 X& l
2. Pick one specific via type.& n0 H* L( ^* U5 |7 J7 \+ [7 @
3. Set row to 2.
" ?1 H3 s) I8 n1 Y) F3 A; q0 w7 b3 xOf 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.3 W& h4 ~! H/ H3 ^7 K5 H
2 U7 z" f4 w- J; N. E
How to use it?
0 s \7 i. K! W' Q! M1) Load this code.8 [1 O; T- M- A( M# E
2) Press your bindkey to invoke such function.
9 ^8 E# Y+ V$ {/ h2 ~*/1 l4 S$ \% G7 ~ b& r* N
/ O+ a2 j5 R7 I! N) ~; L1 `
procedure(CCSRegProc(args)
( C6 L+ C Z- S C args! D+ `+ S) T* `+ W3 S
3 I4 o# e$ z! i( l! m) r5 ?
/* Check if the callback for contactType field is present
& E" `5 _: L+ v+ J* XBy default there is no callback */
- z% u. T3 ~; I W5 a3 c! q7 B3 g6 A3 T
unless(boundp('le0ContactForm)
A! @6 X+ `% h+ ]1 U hiRegTimer("CCScancel()" 1)* z" w6 i' M" Q% w& s
leHiCreateContact()
: u: q( v) X4 T; u" K$ p o: m ) ;unless3 i: H& N c& ?) f- E4 a
) ;proc
9 t! Y0 J- s& K! p; L, X" J' T+ b \3 G/ I, t: }$ D; n+ }: q
procedure(CCScancel()/ h1 ?- u7 z* w
hiFormCancel(le0ContactForm)9 r. l( V2 K1 d, ^7 e0 O
cancelEnterFun(le0ContactForm)
7 ^5 M$ L2 l! Z4 z) ;proc# J. T5 f8 Y$ ^& q8 G; M# }3 W E
* a3 h5 [4 t, y
. }' ~3 }8 S, n+ Q) [procedure(creatCont_via21_2x1(): x; v6 U' {" ^ }2 P$ z: o% l
hiRegTimer("le0ContactForm->contactType->value =\"M2_M1\"" 2)# _) D7 A. }5 _% _6 q# ?
hiRegTimer("le0ContactForm->rows->value = 2" 5)& a9 J0 p* n$ u/ h3 e' P
unless(hiIsFormDisplayed(le0ContactForm) leHiCreateContact())" C& y2 [, O5 M+ H6 F
);end procedure3 i: S' s8 a |# j0 b3 K
hiSetBindKey("Layout" "<Key>1" "creatCont_via21_2x1()" )% ?! o7 _! \, L" {+ F/ }
. i- K0 E0 `. U+ A
9 i, j: ]) x F5 C2 rprocedure(creatCont_via32_2x1()1 a5 V3 p+ E4 ^% e9 K/ P" `
hiRegTimer("le0ContactForm->contactType->value =\"M3_M2\"" 2)1 L) N. X8 E8 H8 b3 e
hiRegTimer("le0ContactForm->rows->value = 2" 5)" |# S' U9 n: V3 X
unless(hiIsFormDisplayed(le0ContactForm) leHiCreateContact())) S. m9 o, W- b- k& \, D! u
);end procedure* o- Y" p% X2 y8 j( \
hiSetBindKey("Layout" "<Key>2" "creatCont_via32_2x1()" ): G# s7 K I( [5 G+ h
% m/ Q! z' [3 |;;you can add more Via like above from here. |
|