You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1 [Au3]Hello world!(msg box) on Sun Aug 29, 2010 5:11 pm

Erebus

avatar
Achiever
Loading
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.





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.





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





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) .




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:





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.



2 Re: [Au3]Hello world!(msg box) on Mon Sep 06, 2010 10:06 pm

xFLAMeHD

avatar
Contributor
Loading
I asume this was watch in youtube or just simply top help you understand the msgbox? IM NOT HATING.

3 Re: [Au3]Hello world!(msg box) on Tue Sep 07, 2010 3:40 am

Coco Puffs


Undertaker
Loading
iight thanks bro.

4 Re: [Au3]Hello world!(msg box) on Wed Sep 08, 2010 1:52 am

Thomas

avatar
Admin
Loading
as i remember i made one that repeated but i forgot the stuff for autoit


___________________________________________

Thomas • Forum Owner - Administrator • Support by PM - Also use the forums please.

5 Re: [Au3]Hello world!(msg box) on Wed Sep 08, 2010 9:33 pm

Sound

avatar
Undertaker
Loading
Thx bro

6 Re: [Au3]Hello world!(msg box) on Wed Sep 08, 2010 11:46 pm

Erebus

avatar
Achiever
Loading
Lol im new so this took a while to write but yeh i saw this on youtube when i was watching a shet load of tuts

7 Re: [Au3]Hello world!(msg box) on Fri Sep 10, 2010 7:55 pm

Wacko9001


Member
Loading
alternative you could open the tutorial and follow it Very Happy ((not hating just saying that the help files have great tutorials.))

8 Re: [Au3]Hello world!(msg box) on Sun Sep 19, 2010 5:32 pm

Erebus

avatar
Achiever
Loading
Its for the people who use notepad/Are new/and dont have the whole package downloaded

9 Re: [Au3]Hello world!(msg box) on Wed Dec 22, 2010 6:37 am

Sleepy

avatar
Contributor
Loading
Protozoid wrote:
[You must be registered and logged in to see this link.] wrote:alternative you could open the tutorial and follow it Very Happy ((not hating just saying that the help files have great tutorials.))

This.

Why are you spamming every single thread on computer programming?

10 Re: [Au3]Hello world!(msg box) on Wed Dec 22, 2010 4:46 pm

The Professor

avatar
Contributor
Loading
[You must be registered and logged in to see this link.] wrote:
Protozoid wrote:
[You must be registered and logged in to see this link.] wrote:alternative you could open the tutorial and follow it Very Happy ((not hating just saying that the help files have great tutorials.))

This.

Why are you spamming every single thread on computer programming?

Lolwat. Are you an idiot? Do you not know what spamming is? What I said was relevant to the topic. So excuse me for asking the first question, the answer is obvious. I do believe that you aren't a moderator nor forum assistant, so technically you're spamming right now. I can pretty much see why you had your power taken away. If you don't know what you're saying then a wise option would be to shut up.

Have a good day sir.

11 Re: [Au3]Hello world!(msg box) on Wed Dec 22, 2010 6:48 pm

Sleepy

avatar
Contributor
Loading
Protozoid wrote:
[You must be registered and logged in to see this link.] wrote:
Protozoid wrote:
[You must be registered and logged in to see this link.] wrote:alternative you could open the tutorial and follow it Very Happy ((not hating just saying that the help files have great tutorials.))

This.

Why are you spamming every single thread on computer programming?

Lolwat. Are you an idiot? Do you not know what spamming is? What I said was relevant to the topic. So excuse me for asking the first question, the answer is obvious. I do believe that you aren't a moderator nor forum assistant, so technically you're spamming right now. I can pretty much see why you had your power taken away. If you don't know what you're saying then a wise option would be to shut up.

Have a good day sir.


LOLOL
Actually, you don't know s**t about what happened to my power.
I just wasn't active, lmao.
Stop talking s**t,if you don't even know what happened.
I can pretty much see why most of the people on this site, don't like you.

12 Re: [Au3]Hello world!(msg box) on Thu Dec 30, 2010 11:09 am

DJ Fresh

avatar
Master
Loading
He is papa he is maid. Embarassed

Sponsored content


Loading

View previous topic View next topic Back to top  Message [Page 1 of 1]

Related topics

Permissions in this forum:
You cannot reply to topics in this forum