Jump to content

Newbe starting AutoIt.v3 Question


Recommended Posts

Aloha,

I have downloaded the AutoIt3.exe program and have some questions on how to start it. Does the program leave an icon on the desktop to activate the program? I didn't know how to begin using the program so I went to my start button, went to programs and scrolled down to the Autoitv3 files and started by opening the "auto help file" and started the tutorial. Is this how it is done?? TIA

Mahalo,

doogdoog

Win98SE

Link to comment
Share on other sites

  • Moderators

Aloha,

I have downloaded the AutoIt3.exe program and have some questions on how to start it. Does the program leave an icon on the desktop to activate the program? I didn't know how to begin using the program so I went to my start button, went to programs and scrolled down to the Autoitv3 files and started by opening the "auto help file" and started the tutorial. Is this how it is done?? TIA

Mahalo,

doogdoog

Win98SE

http://www.autoitscript.com/forum/index.php?showtopic=22805

The first link, and the 1st 2 options here you'll be needing.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

you need to write a script for AutoIt in .au3 format...then u use the compiler to compile the .au3 file to a .exe file

The compiler is there in the autoit folder of which you could create a shortcut to your desktop.

and for writing a .au3 file you could use any text editor, though most of us use the SciTe editor

Hope this helps

Edit: SmOke_N beats me :o

Edited by kclteam

I believe we should all pay our tax with a smile. I tried - but they wanted cash!

Link to comment
Share on other sites

Aloha,

I have downloaded the AutoIt3.exe program and have some questions on how to start it. Does the program leave an icon on the desktop to activate the program? I didn't know how to begin using the program so I went to my start button, went to programs and scrolled down to the Autoitv3 files and started by opening the "auto help file" and started the tutorial. Is this how it is done?? TIA

Depending on how download is set up on your computer, it usually leaves an icon on your desktop... unless you specified a different location ... or your browser is set to put it somewhere else.

Usually, you do this:

1) Download

2) Run installation by clicking on the icon

3) Use your favorite editor to create a file named atest.au3

which contains the following line:

MsgBox(0, "Testing Autoit", "AutoIT running successfully" ,5)

4) Open a DOS command window and change directories to where the file you just created exists.

5) At the command prompt enter:

atest.au3

... you should see a little pop-up window which last for 5 seconds.

-g

Link to comment
Share on other sites

Aloha,

Thanks for all the replies but I still don't understand. I downloaded the program but it did not create an icon on my desktop. Should it have created an icon on my desktop?? If yes, what does the icon look like??? I am thinking that this program creates an icon on your desktop after the installation and after clicking on it, I will be able to use the program. As it is now, I have to click on start and go to programs and then click on AutoItv3 and click on the various icons from there. Is this how you all do it???? TIA

Mahalo,

doogdoog

Link to comment
Share on other sites

i always start with "SciTE" there i have my scripts i have been working on

to create a desktop shortcut... do this

press Start > All Programs > Autoitv3 > Scite (Folder) then

> RIGHT CLICK SciTE ( the one with the black ball )

> Send to > Desktop (creates a shortcut )

then go to School

http://www.autoitscript.com/forum/index.php?showtopic=21048#

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

Aloha,

Thanks for the reply and I tried that and it did make a shortcut on my desktop. It's my mistake because I thought that it just created one icon and I could run the program from there. I tried the tutorial about Hello world and it didn't work. After I created the script, I went to the file and doulble clicked on the file and it opened the SciiTe window. If I right click on the file and click on "run script", it works ok. What's the problem here???

TIA

Mahalo,

doogdoog

Link to comment
Share on other sites

OK lemme explain (although SmOke_N, gstroutz and Valuater have made it clear) once again...

This is a kind of scripting-language. That is to say

1. You write a script (could be in any text editors, preferably in SciTe)

2. You save it as .au3 file (say as helloworld.au3)

3. Compile it to an .exe (say helloworld.exe)

4. Double click that .exe (that is helloworld.exe)

5. See the result.

You can have an icon on the desktop of the SciTe editor (like Valuater explained above) and double click it to start the editor and scribble few lines from the help file and click on Complie...not run directly...then follow the onscreen instruction as to where to save the compiled .exe, etc.

Then start that exe by double clicking it..that's it

I believe we should all pay our tax with a smile. I tried - but they wanted cash!

Link to comment
Share on other sites

Aloha,

Thanks for the fast reply and I see what you mean but when I tried the using the tutorial in Autoitv3 before downloading the Beta and SciTE, I could double click on the helloworld.au3 and it would show the tutorial message box. Now when I double click on the file, it comes up with the SciTE notepad showing the script and not the message box. Oh, I forgot, I double clicked on the file helloworld.au3 the same way as I did it before downloading SciTE and it worked. TIA

Mahalo,

doogdoog

Edited by doogdoog
Link to comment
Share on other sites

I got your point...that's because the primary function of double click was previously defined as Run the script. Now it has been made (i.e. after you installed the SciTe and Beta) as Edit script.

I would still recommend that you Compile your .au3 file into a .exe file and then double-click that .exe to see the result.

This is because, previously when you used to get the result by double clicking the .au3 file, the compiled .exe was made on the fly by the compiler and stored in the temp folder. Instead of doing that it's better that you compile your .au3 script into a .exe yourself and then run the .exe.

Hope I am clear! :o

I believe we should all pay our tax with a smile. I tried - but they wanted cash!

Link to comment
Share on other sites

Aloha kclteam,

Ok, I compiled it and it does work and like you said, "This is because, previously when you used to get the result by double clicking the .au3 file, the compiled .exe was made on the fly by the compiler and stored in the temp folder. Instead of doing that it's better that you compile your .au3 script into a .exe yourself and then run the .exe." was right on. Ok, now I am having a problem writing a script with a path. I tried the example: run (A:\ "filename") to run this script: run (c:\"program files"\"microsoft office"\"office"\"winword.exe") and it wouldn't run. Does this script look ok?? TIA

Mahalo,

doogdoog

Link to comment
Share on other sites

firstly...when u use multiple quotes u will need to use an & in between like:

$name = doogdoog
$msg = "hi " & $name & ", how are you?"

Hope you get it!

Secondly about your script, look at the following code and tell me if it's clear:

$path_to_word = @ProgramFilesDir & "\Microsoft Office\Office\Winword.exe"
Run($path_to_word)

@ProgramFilesDir is a macro that gets the default location of Program Files Directory on any computer. Say if you want the script to run on a friend's computer who has his default Program Files Directory on D: drive then this will still work.

A huge list of macros have been listed in the Helpfile...go through them, they really help.

Edit: P.S.: check the spellings in the path..like I have used Winword.exe...may be it's winword.exe...make sure the spellings in the path are correct :o

Edit2:P.S.: No need to check spellings, I guess...tried one proggy with caps when the file was named in small letters, it still worked :geek:

Edited by kclteam

I believe we should all pay our tax with a smile. I tried - but they wanted cash!

Link to comment
Share on other sites

This was my script to check if spellings in path matter:

Tried the following and saw I got two instances word...that means both work :o

$path_to_word = @ProgramFilesDir & "\Microsoft Office\Office\Winword.exe"
Run($path_to_word)
Sleep(500)
$path_to_word2 = @ProgramFilesDir & "\microsoft office\office\winword.exe"
Run($path_to_word2)

The sleep(500) is just to give CPU a bit of time between the two actions (500 milliseconds).:geek:

I believe we should all pay our tax with a smile. I tried - but they wanted cash!

Link to comment
Share on other sites

Aloha kclteam,

Wow! It worked, but everything is different from the tutorial. Like the $, @. etc. and also the run command. I would never have figured out how to do it the way you did it. TIA and I will try to apply it to what I want to do and I know I will have problems so if you see me asking for help, please respond. LOL Thanks again.

Mahalo,

doogdoog

Link to comment
Share on other sites

  • Moderators

Before you go any further... Take a deep breath, and try Valuators tutorial, and read this PDF file for beginners by LxP: Learning to script with AutoIt 3

This will answer many questions you have now, and a ton more that your going to have.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Aloha kclteam,

I tried a script that I made to run a defrag program and kept running into problems. I finally found out what it was and it's the executable file that starts the program. It ends with .msc and not .exe so the script doesn't work. I looked at the properties of the shortcut for that program and it shows dklite.msc. If I double click on that file, it starts the program. Am I right in thinking that Autoit only runs a file if it ends in exe, bat, com, and pdf or are there more? Is there a fix for this?? I have a question on the script that you posted "Run ($path_to_word)" . Why can't you just use "Run ("filename") to run the file if the path is given "= @ProgramFilesDir & "\Microsoft Office\Office\Winword.exe" ? Well back to the keyboard to try out some other experiments. TIA

Mahalo,

doogdoog

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...