Sign in to follow this  
Followers 0
Caster

Where to learn Basic and advanced AutoIt scripting?

42 posts in this topic

So... I am very new at AutoIt, and I would like some advice and sites for where to start. I have an idea, but I would need to know how to code hibernation scripts/restarting pc, window selection and typing in window. And, if I have a script that should restart my computer and then do something else (like run program and then restart again), can I then put all in one scrip? Will the scrip continue to run where it stopped?

-CasterAnd

PS. I do NOT ask you to write a long reply with a tutorial, all I wish is some helpful websites (other than the AutoIt website itself), and I'll also go and look at example scripts. I think AutoIt will work very good for me, and when I am done with my project, I might post it to the Example Scripts forum section ;)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

There is plenty of tutorials/examples in this forum. Spend some time reading help file.. Search for functions and try to build some code, put it here nad you will get alot of help from others as all people there are very nice and always helps you.

Edited by Edgaras

Share this post


Link to post
Share on other sites

Thanks, Edgaras! I have figured out how to type in certain windows and select them, and timing stuff. But, how do I let the scrip wait until 10:00 AM before continuing?

Share this post


Link to post
Share on other sites

The Wiki is a good source of information too.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Something like:

While 1
    If @HOUR >= 10 and @MIN >= 00 Then ExitLoop
Wend
; Continue your script
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Something like:

While 1
If @HOUR >= 10 and @MIN >= 00 Then ExitLoop
Wend
; Continue your script

I am noob in AutoIt, so.. I do not know what you are talking about. Are you reffering to the part where the script should continue after reboot? ;) EDIT: I forgot what I wrote earlier, Thanks for your help! I now understand..

And, another question, can I make a simple config file for my AutoIt script? That is my first step in my giant script project. Something like this: StartTimeHour: 10

StartTimeMinute: 0

StartTimeSecond: 0

which would be transferred into the script and then start the pc (or wake up) at Hour: 10, Minute 0 and Second 0 (10:00:00)?

Edited by CasterAnd

Share this post


Link to post
Share on other sites

I referred to post #3: "But, how do I let the script wait until 10:00 AM before continuing?"

Now that I have read post #1 I see you need something different.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Alright, so I am downloading "Learning to script with AutoIt" and "AutoIt 1-2-3". I might now be able to write the beginning of my script. Maybe I should do something simple... "Hello world"?

Share this post


Link to post
Share on other sites

And, another question, can I make a simple config file for my AutoIt script? That is my first step in my giant script project. Something like this: StartTimeHour: 10

StartTimeMinute: 0

StartTimeSecond: 0

which would be transferred into the script and then start the pc (or wake up) at Hour: 10, Minute 0 and Second 0 (10:00:00)?

Look into AutoIt's helpfile at IniRead() and IniWrite()

There are also examples ...

Share this post


Link to post
Share on other sites

If your config file needs an extensive hierarchy, look into utilizing an xml config file over an ini file.

If it's a big project... and you're just starting AutoIt... expect it to be re-written at least twice ;)

1 person likes this

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Alright - A little update: I did read about 30 pages about AutoIt (before I got tired), and now my only question is: How do I wake my pc up from hybernating? I have seen a script that does, but I didn't understand much of it (how to configurate it...). All I need, is a code that just wakes up the pc at a certain time, and if someone can help me how to change that time. I would like it to start at 10:00 (Digital clock, NO am/pm). I would then like to have a code that sets the pc to hybernate when the string is being "runned" (I would then use a timer that waits until the time it should hybernate the server, and then the string that stops the server should be started and... set the pc to hybernate.

EDIT:I now know how to hybernate the pc, I now only need to know how to wake it up!

Edited by CasterAnd

Share this post


Link to post
Share on other sites

One thing that really helped me get a grasp on the syntax was knowing how to use the help file efficiently.

When starting off, you may find yourself gazing at a certain function, trying to remember it's parameters and thinking about how tedious it is to open the help file and search for the function and read about it.

Luckily for me, I encountered a post in the wild by jon that explained how a user can simply click the function in question, slap the [F-1] key and watch the help file magically appear in front of your very eyes as you watch it mystically switch right to the page with the function in question, explaining to you in great detail every little aspect of the function (well, at least sometimes) and even giving you an example of how to use it as if it can read your mind.

1 person likes this

Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites

One thing that really helped me get a grasp on the syntax was knowing how to use the help file efficiently.

When starting off, you may find yourself gazing at a certain function, trying to remember it's parameters and thinking about how tedious it is to open the help file and search for the function and read about it.

Luckily for me, I encountered a post in the wild by jon that explained how a user can simply click the function in question, slap the [F-1] key and watch the help file magically appear in front of your very eyes as you watch it mystically switch right to the page with the function in question, explaining to you in great detail every little aspect of the function (well, at least sometimes) and even giving you an example of how to use it as if it can read your mind.

Yea, I have seen the help file very helpful. But, it should still be a string in AutoIt called Wake... which wakes the pc from hybernating/sleeping at a certain time

Share this post


Link to post
Share on other sites

No, there is no such string or native function that does that to my knowledge.

Although, there are alternatives, such as user created functions that use Windows API calls to change settings for that particular matter.

You should use a search technique for locating such functionality.

https://www.google.com/search?q=site:autoitscript.com wake computer hibernation


Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites

And you have been told there is no native function to do that.

Part of programming/Scripting is learning to work around problems you encounter.

If you are unwilling to ponder a suggestion, your journey will be a tedious one.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

I am not 100% sure but I believe Task Scheduler in Windows will wake a computer to run a task so it could handle all of your scheduling and extra triggers.

Share this post


Link to post
Share on other sites

I searched the forum for "hibernation" and found a few threads about the subject. Didn't they give you a solution?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0