Sign in to follow this  
Followers 0
Guest sheepgoat

couple of basic questions

3 posts in this topic

#1 ·  Posted (edited)

i just starting coding with autoit and i am now working on my 3rd script. i'm tring to make a script that will install programs like ad-aware for me.

1) do you have to initialize arrays? do you have to set the length?

2) are there classes?

3) is there any way to get the title and text of the current active window? say have a loop to poll ever .1 sec to see what the current active window is?

ex: if your going through an install and the user has an old verson, sometimes it will come with an uninstall window while your waiting for the license agreement and the script just dies there.

4) i still have a habbit of putting a semicolon at the end of every line. :)

5) are there any other good sites that provide documentation or examples for autoit? i have a bunch more questions about some functions and other stuff.

thanks guys,

sheepgoat

edit: added more questions

Edited by sheepgoat

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

1) do you have to initialize arrays? do you have to set the length?

Yes, but you can ReDim (non-destructively resize) them. See also the StringSplit example in help file.

2) are there classes?

No.

3) is there any way to get the title and text of the current active window?

Opt("WinWaitDelay", 100)
Do
   $activeTitle = WinGetTitle("")
   $activeText = WinGetText("")
Until $activeTitle <> "whateverTitleYouWant"

See also the "AdLibEnable" function....

4) i still have a habbit of putting a semicolon at the end of every line.

No problem since a semicolon denotes the start of a comment :)

5) are there any other good sites that provide documentation or examples for autoit?

Read the help file, seach the forum, and look at the links in the signatures of the top-20 posters, and http://www.autoitscript.com/fileman/users/public/

Make sure to install JdeB's modification of the SciTE text editor

Edit: Larry beat me to it.

Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

thanks a bunch larry. CyberSlug didn't see your post till after i made this on. i didn't notice the help file until now. i've just been using the online documentation.

CyberSlug, your little bit of code was just what i was looking for

edit: just deleted everything below.

the help file answered everything. very nice help file indeed. thank you

Edited by sheepgoat

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