hahajjjjj Posted September 27, 2008 Share Posted September 27, 2008 Hello can you guys please help me, i have three options the one more complicated than the other, if you culd help me with even one of them it wuld be nice. I need help adding a certian amout of waiting time to my script. I want to change the waiting amout while i run the script. so i have an input box where i can write how long time i wont to have the script wait. Ore have an input box where i can put the starting time: f.eks. i write 20:09 and the script continues at 20:09 when the clock is 20:00. so it waits 9 minnutes. And even better, the script reacts with an web page so that it can find out how long it wuld have to wait withouts have an autockliker that drag over the time it wuld be finished. here is my script expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.12.1 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here Run("C:\Program Files\Internet Explorer\iexplore.exe") WinWaitActive("Google - Windows Internet Explorer") MouseClick("primary", 493, 37, 2) Send("www.travian.no") send("{ENTER}") WinWaitActive("Travian - Nettspill - Romere, Gallere & Germanere - Windows Internet Explorer") MouseClick("primary", 46, 361, 2) MouseClick("primary", 388, 396, 2) WinWaitActive("Travian no1 - Windows Internet Explorer") MouseClick("primary", 411, 524, 2) $resourt = InputBox("Question", "tree - 1 weat - 2 leir group - 3 fjell - 4") if $resourt = 1 Then $randomtree = Random (1, 4, 1) if $randomtree = 1 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 248, 345, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf if $randomtree = 2 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 370, 357, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf if $randomtree = 3 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 305, 495, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf if $randomtree = 4 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 285, 541, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf Exit EndIf if $resourt = 2 Then $randomweat = Random (1, 6, 1) if $randomweat = 1 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 307, 343, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf if $randomweat = 2 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 385, 511, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf if $randomweat = 3 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 238, 474, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf if $randomweat = 4 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 188, 483, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf if $randomweat = 5 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 229, 424, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf if $randomweat = 6 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 178, 430, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf Exit EndIf if $resourt = 3 Then $randomleire = Random (1, 4, 1) if $randomleire = 1 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 286, 386, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf if $randomleire = 2 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 349, 406, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf if $randomleire = 3 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 234, 545, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf if $randomleire = 4 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 233, 529, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf Exit EndIf if $resourt = 4 Then $randommounton = Random (1, 4, 1) if $randommounton = 1 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 193, 376, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf if $randommounton = 2 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 407, 398, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf if $randommounton = 3 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 359, 454, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf if $randommounton = 4 Then WinWaitActive("Travian no1 - Windows Internet Explorer", "Favorittkommandolinje") MouseClick("primary", 417, 456, 2) ; put the ip in here WinWaitActive("Travian no1 - Windows Internet Explorer", "Sidekontroll") MouseClick("primary", 238, 481, 2) Exit EndIf Exit EndIf Link to comment Share on other sites More sharing options...
bluelamp Posted September 27, 2008 Share Posted September 27, 2008 check the Date.au3 from the UDF-Part of the Helpfile and especially look at _DateDiff Link to comment Share on other sites More sharing options...
martin Posted September 27, 2008 Share Posted September 27, 2008 Also, have a look at _InetGetSource. Then perhaps you can work out how to get the time from the website. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now