Sign in to follow this  
Followers 0
Canasian

Hi please answer my noob question :D

30 posts in this topic

Hi I'm new and I was looking on google for something fun to do in my computer science class. We don't do much anything having to do with programming.. makes me sad lol hardware/electricity forumalas = boring... I asked him if we'd ever do anything having to do with programming and he said alittle C# but for now the best thing I can do is look for tutorials. I came across this site :) Is autoit a programming language or a type of programming? Or should it be called scripting.. or be in it's own category-autoit? I'm not very smart but I'm willing to learn ^^ I really want to learn alittle programming or how to make something with autoit that's unique and I can be proud of someday ^^ or maybe a well known programming language would be better to learn first? And if so.. which one? Someone told me PERL was good to start with.. ionno.. Ohhh and I did the first couple tutorials on this website in the online documentation section.. but I only saw 3 listed.. is there a huge list of step by step tutorials somewhere that I didn't see? Or what's the easiest/fastest way to learn? lol Thanks for any replys ^^

Share this post


Link to post
Share on other sites



Welcome,

AutoIt is an Interpreted Programming Language.

Learn from the examples in the helpfile and once you start to learn some of the basic functions then you can set yourself some goals to making some scripts that will benefit youself of others. As you go along, learning will accumulate and you will become wiser with the language.

Learning AutoIt will make it easy to use VBScript, VB and other similar basic languages. Choosing a language is based on what you need.

:)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi I'm new

I can see that. Edited by AceLoc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites

First, Welcome to the Auto It world, we love new members.

Second, While some may say Auto it is a bad place to start because you might learn bad habits from it, I would say, if you want a langue where you can write a app in a few hours that looks cool and does something fun, you're in the right place. As for good learning projects, maybe once you get the basics something with an input window and an If then, Elseif, Else, function kind of like a mock password box, or you could have it launch some of your favorite apps, like if you typed word it would launch word ect... If you have any questions just ask them, and we will do our best to answer them.

The first thing you should do is get an understanding of msgbox, run, inputbox, $(Variablename) = inputbox.

How much do you know, do you already understand If then statments, and what about variables, give us some more backround, and we can tell you were to start.

Share this post


Link to post
Share on other sites

First, Welcome to the Auto It world, we love new members.

ohh thats not nice!

now you are kinda including yourself (new members -- 16 posts :)) :sarcasm:

Thnk.


[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites

ohh thats not nice!

now you are kinda including yourself (new members -- 16 posts :)) :sarcasm:

Thnk.

Apparently the more pointless posts you spam, the less of a newbie you become.

Share this post


Link to post
Share on other sites

...I was looking on google for something fun to do in my computer science class...

Then you have come to the right place. Welcome and take a look here: http://www.autoitscript.com/forum/index.ph...showtopic=21048

...Second, While some may say Auto it is a bad place to start because...

Who do we need to string up? :-)

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

is there a huge list of step by step tutorials somewhere that I didn't see? Or what's the easiest/fastest way to learn?

There is no real quick and easy way of learning any programming or scripting language. It takes time and effort. A person who is really wanting to learn and grow with programming and scripting takes years to be able to understand and comprehend as much as they can to do what they need or want to do.

So, the answer to your question is...yes, there are more tutorials. No, there is no real quick and easy way to learn it. Programming and scripting is just like any other language out there. Take the English language for example. According to global statistics, it is the hardest language in the worl to learn. To some of us here it is easy because we grew up with hearing and being taught how to read, write, and speak the language. If you were raised that way with programming then programming and scripting would be so much easier to everyone.

If you have any questions be feel free though to ask at anytime here on the fourm or you can email me if you would like

Edited by terrabyte

"...Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like.My crime is that of outsmarting you, something that you will never forgive me for." --The Mentor"Mess with the best, die like the rest!!" -Hackers"This above all to thine own self be true." -William Shakespeare"Corruption is only as corrupted as the individual makes it out to be." -Mozart_ONLINECheck out this free 1 GB FTP website at DriveHQ.com. You can control the users and even publish a website for free!![s]Your-Start.com - A online website that you can customize to hold all you links, news information, and other website info.[/s]

Share this post


Link to post
Share on other sites

Apparently the more pointless posts you spam, the less of a newbie you become.

i wasnt talking against you... or did i? :)

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites

Tyvm everyone :D You all seem very nice ^^ and replied very fast too. I've been messing around with it for the last few hours.. Working on my first script yayyy!! It's a combo of the first 2 tutorials plus some other stuff i found in the documentation.. It writes a batch file in notepad then saves it as .bat... but now i can't get it to open the batch file.. how do i get it to run? Run("Matrix.exe") doesn't work and I tried to use FileOpen that didn't work either.. then I tried to do the whole address to run it from desktop where it saves but that didn't work either :P And I guess just saving it with alt + S would make it save to a different place than on my comp.. like it saves to my desktop tho it might save to someone elses My Documents file instead unless i added a way for it to select where to save it right..? Oh and the error it gave when i tried to run it was.. cannot load external file or something like that.. so what do i do? Find a way to move it to a directory and run it from there :)? Bleh.. thanks ^^

Share this post


Link to post
Share on other sites

Tyvm everyone :D You all seem very nice ^^ and replied very fast too. I've been messing around with it for the last few hours.. Working on my first script yayyy!! It's a combo of the first 2 tutorials plus some other stuff i found in the documentation.. It writes a batch file in notepad then saves it as .bat... but now i can't get it to open the batch file.. how do i get it to run? Run("Matrix.exe") doesn't work and I tried to use FileOpen that didn't work either.. then I tried to do the whole address to run it from desktop where it saves but that didn't work either :P And I guess just saving it with alt + S would make it save to a different place than on my comp.. like it saves to my desktop tho it might save to someone elses My Documents file instead unless i added a way for it to select where to save it right..? Oh and the error it gave when i tried to run it was.. cannot load external file or something like that.. so what do i do? Find a way to move it to a directory and run it from there :)? Bleh.. thanks ^^

Hey,

By the sounds of it you are opening notepad the program itself, writing text to it using Send? Then saving this file using alt+s or something along those lines??

If you could maybe post some code or clarify a little it might be a bit easier to help you out :D

Cheers,

Share this post


Link to post
Share on other sites

Hey,

By the sounds of it you are opening notepad the program itself, writing text to it using Send? Then saving this file using alt+s or something along those lines??

If you could maybe post some code or clarify a little it might be a bit easier to help you out :P

Cheers,

Ok :)

MsgBox(0,"My First Attempt","This is my first try at making a script from my own idea =D Tell me if you find anything wrong with it ^^.")
Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
Send(":Start")
Send("{Enter}")
Send("echo off")
Send("{Enter}")
Send("color 2")
Send("{Enter}")
Send("echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%")
Send("{Enter}")
Send("color 2a")
Send("{Enter}")
Send("goto start")
WinClose("Untitled - Notepad")
WinWaitActive("Notepad", "The text in the Untitled file has changed")
Send("!Y")
Send("Matrix.bat")
Send("!s")
Run("Matrix.bat")
Send("!{Enter}")
Sleep("10")
Send("!{Enter}")
Send("^c")
Send("Y")
Send("{Enter}")

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

lol i like the homemade matrix effect, :)

another way to do it without using windows controls could be something along the lines of

$content = ":Start" & @CRLF ;starts the varaible with content and the @CRLF adds a line feed (i.e goes to new line)
$content &= "echo off" & @CRLF ;the &= adds this line to the variable
$content &= "color 2" & @CRLF ;same as above, added to the variable
$content &= "echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%" & @CRLF
$content &= "color 2a" & @CRLF
$content &= "goto start"

$file = FileOpen(@ScriptDir & "\Matrix.bat", 2) ;opens (or creates) the batch file in the directory where the script is run from
FileWrite($file, $content) ;writes the content of our content variable (which is all the lines added together and structured with the line feeds (@CRLF)
FileClose($file) ;closes the file so we can run it

Run(@ScriptDir & "\Matrix.bat")

which should hopefully write the Matrix.bat file to the directory the script is run from as well as running it.

Alot better than mucking around with Send IMO but its good your starting off with those types of functions :P

Edited by fu2m8

Share this post


Link to post
Share on other sites

Now the next step, is to make this in autoit, Asin, Not using a .bat file :)


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

As someone who has been writing programs in various languages for the last 21 years, it aiin't the language that's the problem, it's working out the algorithmic solution.

A typical example was my "Search and Replace" Notepad grief in another thread -- God know's why it never occurred to me to just open the file and read it... I must be getting senile!!

Jim.

Share this post


Link to post
Share on other sites

ohh thats not nice!

now you are kinda including yourself (new members -- 16 posts :)) :sarcasm:

Thnk.

Hey, just because I didn't register for the forums earlier doesn't mean I haven't been useing Autoit, or that I haven't beeen reading them, or posting under anouther name =P.

Share this post


Link to post
Share on other sites

lol i like the homemade matrix effect, :)

another way to do it without using windows controls could be something along the lines of

$content = ":Start" & @CRLF ;starts the varaible with content and the @CRLF adds a line feed (i.e goes to new line)
$content &= "echo off" & @CRLF ;the &= adds this line to the variable
$content &= "color 2" & @CRLF ;same as above, added to the variable
$content &= "echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%" & @CRLF
$content &= "color 2a" & @CRLF
$content &= "goto start"

$file = FileOpen(@ScriptDir & "\Matrix.bat", 2) ;opens (or creates) the batch file in the directory where the script is run from
FileWrite($file, $content) ;writes the content of our content variable (which is all the lines added together and structured with the line feeds (@CRLF)
FileClose($file) ;closes the file so we can run it

Run(@ScriptDir & "\Matrix.bat")

which should hopefully write the Matrix.bat file to the directory the script is run from as well as running it.

Alot better than mucking around with Send IMO but its good your starting off with those types of functions :party:

=D That's cool lol thx. But that doesn't show how the bat file was made :P that's kinda how I got the idea of making it.. a few people wanted to know how i did the simple matrix.bat thing and I thought it'd be neat to make it open up notepad then close it all on it's own then open it and make the matrix.bat fullscreen :D and if there's a way to slow down the typing so they can see it better? And I still can't get it to open the .bat :D Or did I miss something you said? lol sorry

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

...a way to slow down the typing so they can see it better? And I still can't get it to open the .bat...

This line saves the file to some location on the harddrive:

Send("Matrix.bat")

This line attempts to run the file - but it may be looking in the wrong place for that file.

Run("Matrix.bat")

Suggest that you specify the full path for both lines...

Lookup "Opt" in the help file - specifically, SendKeyDelay to slow down "AutoIt's typing" via the Send function.

hope this helps

Edit: Opps forgot to mention that I'm referencing the code in post #12

http://www.autoitscript.com/forum/index.ph...st&p=242734

Edit2: When you said "slow down the typing - did you meant AutoIt's typing into Notepad or what the batchfile "types"?

Edit3: If you want to slow down the output of the batch file, make something like this:

:Start

echo off

color 2

echo %random% %random% .......

color 2a

ping -n 1 127.0.0.1 >NUL

goto start

or google for other methods of batch file delay

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Ty, I think it's fixed :)

MsgBox(0,"My First Attempt","This is my first try at making a script from my own idea =D Tell me if you find anything wrong with it ^^.")
Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
Send(":Start")
Send("{Enter}")
Send("echo off")
Send("{Enter}")
Send("color 2")
Send("{Enter}")
Send("echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%")
Send("{Enter}")
Send("goto start")
WinClose("Untitled - Notepad")
WinWaitActive("Notepad", "The text in the Untitled file has changed")
Send("!Y")
Send("Matrix.bat")
Send("!s")
Sleep("1000")
Run("Matrix.bat")
Send("!{Enter}")
Sleep("3000")
Send("^c")
Send("Y")
Send("{Enter}")

Test it for me plz ^^ what should i try to work on next?

Share this post


Link to post
Share on other sites

...Test it for me plz...

I get this from SciTE when I run your code:

>Running:(3.2.0.1):C:\Program Files\AutoIt3\autoit3.exe "c:\Temp\SciTE-temp.au3"

C:\Temp\SciTE-temp.au3 (19) : ==> Unable to execute the external program.:

Run("Matrix.bat")

The system cannot find the file specified.

and now I have Matrix.bat in my "My Docs" folder

and the script attempted to run it from Matrix.bat from my c:\temp folder.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0