Sign in to follow this  
Followers 0
mpalhas

A Few Question

5 posts in this topic

hi, i recently discovered AutoIt and i'm just sorry i didn't discovered it before

for now i'm just reading de help documentation and trying a few basic scripts just to get used to the language a to know the basics.

i hope that a can learn enough to start making real scripts

one thing that i would really love to do was a script to automatically download files from a list

probably there's already something like that but i want to finally be able to say "i made this myself!".

so i would like to ask a few things, that i couldn't find in the AutoIt Help

1- if i create a program, in C for example, i know how to call the EXE from my AutoIt script, but how do i get value returned by that program?

probably the things i want to do with a C program can also be done with AutoIt, but sice i'm much more used to C, i though it would be easier to do it this way...

2- lately, i've been hearing a lot about XML. i've never actually worked with it, but since it's become so popular i guess i won't hurt to start using it, so i though of using it to store the info of the files to download.

but how can i interact with XML using AutoIt? no only read the data, but also add new data (like create a simple GUI to easily add files to the list)

or should i do like i said in question 1 and use another language to manage that part? if so, what language do you recommend?

3- on my scripts i've been trying to interact with different programs, but i think i still don't understand how to use Controls.

For example, if i open My Documents or any other explorer window, and i use Au3Info to get the info from that window, i don't find any info that i can use to exactly the button i want to use. if i want info about the Edit menu in the top menu bar, it seems the Control is not just that menu, but the whole menu bar. i hope i explained correctly.

so how do i click in the Edit menu, if all the menus in that bar have the same Class, ID... what do i use to distinguish them? and how to do it for those programs that use non-standart Controls?

thanks in advance

Share this post


Link to post
Share on other sites



Firstly, Welcome to the forums! :)

For #1 See the autoit helpfile for Run()

(note, that link is to the online help, and while it is mostly correct, it is outdated. Best bet is the Helpfile that comes with autoit when you install it)

Share this post


Link to post
Share on other sites

2- lately, i've been hearing a lot about XML. i've never actually worked with it, but since it's become so popular i guess i won't hurt to start using it, so i though of using it to store the info of the files to download.

but how can i interact with XML using AutoIt? no only read the data, but also add new data (like create a simple GUI to easily add files to the list)

or should i do like i said in question 1 and use another language to manage that part? if so, what language do you recommend?

Windows comes with a software interface for working with XML files, in MSXML. Interfacing with that directly can get quite complicated. Fortunately, eltorro as created a UDF file to enable AutoIt scripts to use it with the same syntax as other AutoIt functions. That UDF is called XMLDOM_UDF.au3.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

thanks for both answers. about the first one, it seems what i'm looking for is the function StdoutRead. i'll give it a try later

so, about question 3, could anyone help me, or at least give a simples example?

Share this post


Link to post
Share on other sites

3- on my scripts i've been trying to interact with different programs, but i think i still don't understand how to use Controls.

For example, if i open My Documents or any other explorer window, and i use Au3Info to get the info from that window, i don't find any info that i can use to exactly the button i want to use. if i want info about the Edit menu in the top menu bar, it seems the Control is not just that menu, but the whole menu bar. i hope i explained correctly.

so how do i click in the Edit menu, if all the menus in that bar have the same Class, ID... what do i use to distinguish them? and how to do it for those programs that use non-standart Controls?

Some controls have internal structures that must be accessed with special calls to an API. A classic example is SysListView32 controls in Explorer windows. You can still work with them, but it requires more advanced methods, as found in the _GUICtrlListView_* or _GuiCtrlMenu_* UDFs. Experiment with the examples in the help file.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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