Teen 9x
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.

Teen 9x

Chào Mừng Bạn Đến Với Thế Giới Của Tuổi Teen 9x
 
Trang ChínhTrang Chính  Trang ChủTrang Chủ  GalleryGallery  Đăng kýĐăng ký  Latest imagesLatest images  Tìm kiếmTìm kiếm  Đăng NhậpĐăng Nhập  

 

 First script with autoit ! Let's join !

Go down 
Tác giảThông điệp
™Pham Nguyen™
Admin
Admin
™Pham Nguyen™


Tổng số bài gửi : 347
Age : 34
Đến từ : Viet Nam
Registration date : 06/02/2008

First script with autoit ! Let's join ! Empty
Bài gửiTiêu đề: First script with autoit ! Let's join !   First script with autoit ! Let's join ! Icon_minitimeSat Mar 01, 2008 10:41 pm

This tutorial explains the basics of creating an AutoIt script and running it. The tutorial assumes that you have already fully installed AutoIt v3 using the supplied installer.
First open a folder where you wish to create the script. Right-click in the folder and select New / AutoIt v3 Script.
First script with autoit ! Let's join ! Filenew
A new file will be created, immediately allowing you to rename it to something more appropriate. Change 'New AutoIt v3 Script' to 'helloworld', leaving the '.au3' in the name intact if it is visible.
Now we have created the script file we want to edit it to make it do something useful. Right-click on helloworld.au3 and select Edit Script.

First script with autoit ! Let's join ! Fileedit

The SciTE editor will open and you will see something like this



First script with autoit ! Let's join ! Template
The code you see is simply some comments that you can use to organise your scripts. The lines that start with a semi-colon ; and are treated as comments (ignored). ; is similar to the REM statement in a DOS batch file.
Now we want to tell AutoIt to display a message box - this is done with the MsgBox function.
At the bottom of the file type the following:

MsgBox(0, "Tutorial", "Hello World!")

All functions take parameters, MsgBox takes three - a flag, a title and a message. The flag is a number that changes the way MsgBox displays - we will use 0 for now. The title and message are both string parameters - when using strings in AutoIt surround the text in double or single quotes. "This is some text" or 'This is some text' - both will work fine.
Now save the script and close the editor. You've just written your very first AutoIt script! To run the script simply double-click the helloworld.au3 file (you may also right-click the file and select Run Script) .
You should see this:
First script with autoit ! Let's join ! Msgbox
Now, let's look at the flag parameter for the MsgBox function again. From the manual page we can see various values listed which change the way MsgBox displays. The value of 0 simply shows a simple message box with an OK button. A value of 64 displays the message box with an information icon.
Edit the script again and change the 0 to 64 so you have:

MsgBox(64, "Tutorial", "Hello World!")


Run the script and you will see:

First script with autoit ! Let's join ! Msgbox2

Experiment with the various flag values to see what kind of results you can get. Remember, if you want to use more than one flag value then simply add the required values together.
Soure of :
www.autoitscript.com

Note : This is first script,let's read and try to do it.You wil feel hapy when see your first program !
Về Đầu Trang Go down
https://phamnguyen.forum-viet.com
 
First script with autoit ! Let's join !
Về Đầu Trang 
Trang 1 trong tổng số 1 trang
 Similar topics
-
» Ebook Java Script tiếng Việt !

Permissions in this forum:Bạn không có quyền trả lời bài viết
Teen 9x :: Công Nghệ Thông Tin :: Lập Trình-
Chuyển đến