Caster Posted June 18, 2012 Share Posted June 18, 2012 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 Link to comment Share on other sites More sharing options...
EmptySpace Posted June 18, 2012 Share Posted June 18, 2012 (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 June 18, 2012 by Edgaras Link to comment Share on other sites More sharing options...
Caster Posted June 18, 2012 Author Share Posted June 18, 2012 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? Link to comment Share on other sites More sharing options...
water Posted June 18, 2012 Share Posted June 18, 2012 The Wiki is a good source of information too. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted June 18, 2012 Share Posted June 18, 2012 (edited) Something like: While 1 If @HOUR >= 10 and @MIN >= 00 Then ExitLoop Wend ; Continue your script Edited June 18, 2012 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Zedna Posted June 18, 2012 Share Posted June 18, 2012 The best source of usefull information: "C:Program FilesAutoIt3AutoIt.chm" Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Caster Posted June 18, 2012 Author Share Posted June 18, 2012 (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 June 18, 2012 by CasterAnd Link to comment Share on other sites More sharing options...
water Posted June 18, 2012 Share Posted June 18, 2012 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Caster Posted June 18, 2012 Author Share Posted June 18, 2012 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"? Link to comment Share on other sites More sharing options...
Zedna Posted June 18, 2012 Share Posted June 18, 2012 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: 10StartTimeMinute: 0StartTimeSecond: 0which 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 ... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Mechaflash Posted June 18, 2012 Share Posted June 18, 2012 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 Caster 1 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.” Link to comment Share on other sites More sharing options...
Caster Posted June 18, 2012 Author Share Posted June 18, 2012 (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 June 18, 2012 by CasterAnd Link to comment Share on other sites More sharing options...
Skitty Posted June 18, 2012 Share Posted June 18, 2012 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. Caster 1 Link to comment Share on other sites More sharing options...
Caster Posted June 18, 2012 Author Share Posted June 18, 2012 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 Link to comment Share on other sites More sharing options...
Skitty Posted June 18, 2012 Share Posted June 18, 2012 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 Link to comment Share on other sites More sharing options...
Exit Posted June 18, 2012 Share Posted June 18, 2012 Just use this freeware:http://dennisbabkin.com/wosb/ App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Caster Posted June 18, 2012 Author Share Posted June 18, 2012 Just use this freeware:http://dennisbabkin.com/wosb/I am using it, but I asked for coding it into AutoIt, not having another program. Link to comment Share on other sites More sharing options...
JohnOne Posted June 19, 2012 Share Posted June 19, 2012 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. Link to comment Share on other sites More sharing options...
Nunos Posted June 19, 2012 Share Posted June 19, 2012 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. Link to comment Share on other sites More sharing options...
water Posted June 19, 2012 Share Posted June 19, 2012 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts