Tải bản đầy đủ (.pdf) (6 trang)

AutoIT Help part 15 pps

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (105.71 KB, 6 trang )


;;; #cs
MsgBox(4096, "", "This will print if '#cs' is commented out.")
#ce



Keyword Reference
#comments-start
ghi chú trên nhiều dòng
#comments-start


#comments-end
Tham số
ko
Nhận xét
có thể dùng #cs #ce cũng có tác dụng tương tự
hàm liên quan
#include, #include-once
Ví dụ

#comments-start
MsgBox(4096, "", "This won't be executed")
MsgBox(4096, "", "Or this")
#comments-end

;;; #cs
MsgBox(4096, "", "This will print if '#cs' is commented out.")
#ce




Keyword Reference
#comments-start
ghi chú trên nhiều dòng
#comments-start


#comments-end
Tham số
ko
Nhận xét
có thể dùng #cs #ce cũng có tác dụng tương tự
hàm liên quan
#include, #include-once
Ví dụ

#comments-start
MsgBox(4096, "", "This won't be executed")
MsgBox(4096, "", "Or this")
#comments-end

;;; #cs
MsgBox(4096, "", "This will print if '#cs' is commented out.")
#ce



Keyword Reference
#include

Bao gồm thêm tư viện cho file
#include "[path\]filename"
#include <filename>
tham số
filename
cần thiết là chuỗi kí tự ko đc dùng biến
nếu dùng < > thì sẽ đc hiểu là file trong thư viện của autoit (trong th
ư
mục cài autoit \ includes)
nếu dùng " " thì là đường dẫn đầy đủới file cần include

nhận xét

nếu bạn có nhiều thư viện và trong mỗi thư viên có hàm giống nhau thì từ khóa
#include-one là cần thiết ở đầu để bỏ qua nạp chồng hàm trùng tên

nếu sử dụng #include < > thì autoit sẽ tìm kiếm ở thư viện của nó trước nếu ko có
sẽ tìm đến đường dẫn chính xác của file nếu ko tìm thấy nữa thì tìm trên thư mục
chủ chứa file.exe
nếu sử dụng #include " " thì autoit tìm kiếm theo chiều ngược lại ở trên
hàm liên quan
#include-once, FileInstall
Ví dụ

;;; TIME.AU3 ;;;
MsgBox(0,"", "The time is " & @HOUR & ":" & @MIN & ":" & @SEC)

;;; SCRIPT.AU3 ;;;
#include "TIME.AU3"
MsgBox(0,"", "Example")

#include "TIME.AU3"
Exit

; Running script.au3 will output three message boxes:
; one with the time, one with 'Example', and another with the time.




Keyword Reference
#include-once
Quy định rằng các tập tin hiện nay chỉ có thể được bao gồm một lần.
#include-once
Parameters
None.
Remarks
nếu bạn có nhiều thư viện và trong mỗi thư viên có hàm giống nhau thì từ khóa
#include-one là cần thiết ở đầu để bỏ qua nạp chồng hàm trùng tên
Related
#include, FileInstall
Example

;;; LIBRARY.AU3 ;;;
#include-once

Func myFunc()
MsgBox(0,"", "Hello from library.au3")
EndFunc



;;; SCRIPT.AU3 ;;;
#include "Library.au3"
#include "Library.au3" ;throws an error if #include-once was not used

MsgBox(0, "Example", "This is from 'script.au3' file")
myFunc()
Exit

; Running script.au3 will output the two message boxes:
; one saying "This is from 'script.au3' file"
; and another saying "Hello from library.au3"



Keyword Reference
#NoTrayIcon
không hiện icon của chương trình trên khay hệ thống
#NoTrayIcon
Parameters
None.
Remarks
Có thể sử dụng Opt ( "TrayIconHide", 1) để loại bỏ các AutoIt khay biểu tượng
nhưng nó vẫn sẽ được hiển thị cho một lần thứ hai khi script bắt đầu.

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×