Nơi chia sẽ kiến thức về CNTT
thủ thuật Blogger, thủ thuật AutoIT
Imacross, VBA cho Excel

8 thg 1, 2014

Bài 5: Hàm trong Autoit

Hàm

Hàm trong AutoIt được định nghĩa bằng cách dùng khối Func...EndFunc:

Code:
Func MyDouble($value)
     $value = $value * 2
     Return $value
EndFunc

Sử dụng hàm cũng rất đơn giản:
Code:

$val = 10 
For $i = 1 To 10
     $doubled = MyDouble($val)
     MsgBox(0, "", $val & " doubled is " & $doubled)
     $val = $doubled
Next
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 nhận xét

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

 
© 2016 Blog kiến thức
Designed by blgkienthuc.blogspot.com Cooperated with blgkienthuc.blogspot.com/
Released under Creative Commons
Posts RSSComments RSS
Back to top