1. Trang chủ
  2. » Công Nghệ Thông Tin

AutoIT Help part 97 pdf

5 202 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 22,36 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

The string returned will not exceed 254 characters and if input contains carriage returns or linefeeds, the result will be truncated at the first occurrence of those characters.. The sec

Trang 1

2 = The Timeout time was reached

3 = The InputBox failed to open This is usually caused by bad arguments

Remarks

The InputBox is user-resizable, but has a minimum size of approximately 190 x

115 pixels Default size is approximately 250 x 190 pixels

The string returned will not exceed 254 characters and if input contains carriage returns or linefeeds, the result will be truncated at the first occurrence of those characters

The second and subsequent characters of the password field can be used to restrict input Use a space to fill the first character to still see the characters typed Putting

an M after the first character indicates that input is Mandatory; i.e you must enter something Nothing will happen if you press the Ok button when there is nothing

in the InputBox It will not close and return the string

You can also specify the maximum length in the end of the password field Just enter a number as the last character to specify the length of the string

Related

MsgBox

Example

;Places the input box in the top left corner displaying the characters as they

;are typed

$answer = InputBox("Question", "Where were you born?", "Planet Earth", "", _ -1, -1, 0, 0)

;Asks the user to enter a password Don't forget to validate it!

$passwd = InputBox("Security Check", "Enter your password.", "", "*")

;Asks the user to enter a 1 or 2 character response The M in the password

;field indicates that blank string are not accepted and the 2 indicates that the

Trang 2

;responce will be at most 2 characters long

$value = InputBox("Testing", "Enter the 1 or 2 character code.", "", " M2")

Function Reference

MsgBox

Displays a simple message box with optional timeout

MsgBox ( flag, "title", "text" [, timeout [, hwnd]] )

Parameters

flag The flag indicates the type of message box and the possible button

combinations See remarks

title The title of the message box

text The text of the message box

timeout

[optional] Timeout in seconds After the timeout has elapsed the message box will be automatically closed The default is 0, which is

no timeout

hwnd [optional] The window handle to use as the parent for this dialog

Return Value

Success: Returns the ID of the button pressed

Failure: Returns -1 if the message box timed out

Button

Pressed Return Value

Trang 3

CANCEL 2

IGNORE 5

TRY

AGAIN ** 10

CONTINUE

Remarks

The flag parameter can be a combination of the following values:

decimal

flag Button-related Result

hexadecimal flag

decimal

flag Icon-related Result

hexadecimal flag

Trang 4

64 Information-sign icon consisting of an 'i' in a

decimal

flag Default-related Result

hexadecimal flag

decimal

flag Modality-related Result

hexadecimal flag

decimal

flag Miscellaneous-related Result

hexadecimal flag

262144 MsgBox has top-most attribute set 0x40000

524288 title and text are right-justified 0x80000

** Only valid on Windows 2000/XP and above

For example, to specify a SYSTEMMODAL box with the YES/NO buttons the flag value would be 4096+4 (or 4100) If using hexadecimal flags, that would be 0x1000+0x4 (or 0x1004)

A message box appears centered on screen and resizes according to the text it contains However, the title could get truncated if the SYSTEMMODAL flag (4096) is used

If "title" is equal to Default keyword @Scriptname is used

Related

InputBox, ToolTip, TrayTip, SplashTextOn

Example

Trang 5

MsgBox(4096, "Test", "This box will time out in 10 seconds", 10)

Function Reference

ProgressOff

Turns Progress window off

ProgressOff ( )

Parameters

None

Return Value

None

Remarks

None

Related

ProgressSet, ProgressOn

Example

ProgressOff()

Ngày đăng: 02/07/2014, 17:21

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN