@DesktopDepth
Chiều sâu của desktop (pixel)
@DesktopRefresh
Tốc độ làm tươi của desktop (hz)
Macro Reference - Time And Date
Dưới đây là danh sách các macros về Thời gian và Ngày
Các danh sách đầy đủ các macros có thể được tìm thấy ở đây .
Macro
Description
@MSEC
Milli giây của thời gian hệ thống [00 999]
@SEC
giây của thời gian hệ thống [00 59]
@MIN
phút của thời gian hệ thống [00 59]
@HOUR
giờ của thời gian hệ thống [00 23]
@MDAY
ngày của ngày hệ thống [1 31]
@MON
tháng của ngày hệ thống [1 12]
@YEAR
tháng của ngày hệ thống
@WDAY
Thứ của ngày hệ thống [1 7], thứ 1 là chủ nhật :P
@YDAY
ngày thứ bao nhiêu trong năm [1 366]
Chú ý
Nhiều hàm có dạng function( $p1, $p2 [, $p3]) thì các tham số $p1, $p2 là bắt buộc
phải đc truyền vào, còn các tham số $p3 thì ko truyền cũng đc, nếu ko truyền thì nó
lấy giá trị mặc định, nếu truyền vào thì nó lấy giá trị truyền vào
những tham số kiểu "text" có dấu "" thì đó là xâu kí tự có thể là biến xâu
một số hàm sử dụng @error, nếu @error=0 thì là ko lỗi, nếu khác 0 thì có lỗi
một số hàm sử dụng tham số là biến mảng, và cũng có hàm trả lại biến mảng lên
cần chú ý
Function Reference
ClipGet
trả lại đoạn text đc lưu trong clipboard (bộ nhớ dùng để lưu tạm các thông tin khi
ta ấn copy, Ctrl+c)
ClipGet ( )
Parameters
None.
Return Value
thành công: trả lại text
lỗi: đặt @error = 1 nếu clipboad rỗng
đặt @error = 2 nếu trong clipboard ko có text
đặt @error = 3 nếu ko truy nhập đc vào clipboard
Remarks
khi trong clipboard có nhiều tệp tin hay thư mục thì hàm sẽ trả lại 1 đoạn text gồm
các tệp tin hay thư mục đc cách nhau bởi dấu @LF
Related
ClipPut
Example
$bak = ClipGet()
MsgBox(0, "Clipboard contains:", $bak)
ClipPut($bak & "additional text")
MsgBox(0, "Clipboard contains:", ClipGet())
Function Reference
ClipPut
gửi đoạn text tới clipboard.
ClipPut ( "value" )
Parameters
value đoạn text để gửi
Return Value
Success:
Returns 1.
Failure:
Returns 0.
Remarks
hàm sẽ làm mất dữ liệu trước đó trong clipboard
nếu value="" thì tức là làm rỗng clipborad
Related
ClipGet
Example
ClipPut("I am copied to the clipboard")
Function Reference
EnvGet
Retrieves an environment variable.
EnvGet ( "envvariable" )
Parameters
envvariable
Name of the environment variable to get such as "TEMP" or "PATH".
Return Value
Returns the requested variable (or a blank string if the variable does not exist).
Remarks
None.
Related
EnvSet, EnvUpdate
Example
$var = EnvGet("PATH")
MsgBox(4096, "Path variable is:", $var)
Function Reference
EnvSet
Writes an environment variable.
EnvSet ( "envvariable" [, "value"] )
Parameters
envvariable
Name of the environment variable to set.
value
[optional] Value to set the environment variable to. If a value is not
used the environment variable will be deleted.
Return Value
Success:
Returns not 0.
Failure:
Returns 0.
Remarks
A environment variable set in this way will only be accessible to programs that
AutoIt spawns (Run, RunWait). Once AutoIt closes, the variables will cease to
exist.
Related
EnvGet, EnvUpdate
Example
EnvSet("MYENV", "this is a test")
Function Reference
EnvUpdate
Refreshes the OS environment.
EnvUpdate ( )
Parameters
None.
Return Value
Success:
None.
Failure:
Sets @error to 1.
Remarks
Similar effect as logging off and then on again. For example, changes to the
%path% environment might not take effect until you call EnvUpdate (or you
logoff/reboot).
Related
EnvGet, EnvSet
Example
EnvUpdate()
Function Reference
MemGetStats
lấy thông tin liên quan đến bộ nhớ (RAM).
MemGetStats ()
Parameters
None.
Return Value
trả lại mảng gồm 7 phần tử với các thông tin sau
$array[0] = Tỷ lệ phần trăm bộ nhớ được sử dụng
$array[1] = Tổng dung lượng RAM
$array[2] = đã dùng RAM
$array[3] = Tổng số Pagefile
$array[4] = đã dùng Pagefile
$array[5] = Tổng số bộ nhớ ảo
$array[6] = đã dùng bộ nhớ ảo
các kích thước đều có đơn vị là kilobytes.
Remarks
None.
Related
None.
Example