[FUNC]循环输出字符串中的字符

来源:互联网 发布:2017淘宝答题答案 编辑:程序博客网 时间:2024/06/06 09:15
;~ http://www.autohotkey.com/forum/viewtopic.php?p=388494#388494~LButton::;~ Send, % Cycle("a,b,c")  MsgBox % Cycle(  "abcdefgh"  ,  1  ,  ""  )  MsgBox % Cycle(  "a2|b2|c2|d2|e2|f2|g2|h2"  ,  0  ,  "|"  )  MsgBox % Cycle(  "a3,b3,c3,d3,e3,f3,g3,h3"  ,  0  )  ;~ MsgBox % Cycle(  "this,should,not,be,visible,at,all,!!!"  ,  -1  );-----------------------------------------------------------Cycle(Input,Step=1,Delim=",",Omit=" `t"){  static Idx := 0  StringSplit, Arr, Input, %Delim%, %Omit%  Return (!Arr0)OR((Idx:=Abs(1+Mod(Idx+Step-1,Arr0)))=0)    ? "" : Arr%Idx%}


0 0
原创粉丝点击