ColdDeath Posted November 16, 2008 Share Posted November 16, 2008 Hello,I'm a Firefox user, and AutoIt v3 user. I'm new to the forum, this is my first post, hope you can help me! Al the question are related to Firefox:Q1:The time of loading of pages is bugging me out, I put the script on sleep for a few seconds, and when I need to click something, the page is useally loaded, but not always.I've tried searching around with Window Info, but the windows doesn't change from title or anything. The only thing that changes is the Statusbar, but that information isn't given in Window Info... So my question, is it possible to make a "winwaitactive" command on the firefox status bar?Q2:Script 1While $bLoop = 1 $text = InputBox("Planet Checker", "Input land value") If $text < "850" Then $answer = MsgBox(4, "Too bad", "The number was under 850!") Else $answer = MsgBox(4, "Congratz", "The number was over 850!")WEndScript 2Send ("866{Enter}")It tried combining it like thisWhile $bLoop = 1 $text = InputBox("Planet Checker", "Input land value")Send ("866{Enter}") If $text < "850" Then $answer = MsgBox(4, "Too bad", "The number was under 850!") Else $answer = MsgBox(4, "Congratz", "The number was over 850!")WEndBut that doesnt work, only when inputbox has been filled in it will execute the send command. Any suggestions?Q3:Script 1While $bLoop = 1winactivate ("AutoIt Forums")sleep (5000)WEndScript 2While $bLoop = 1if winactive ("There's no internet") =1 ThenSend ("{F}5")WEndHow can I combine the control script (Script 2) with the main script (Script 1) without spamming the control script on every line in the main script?Greetings,ColdDeath Link to comment Share on other sites More sharing options...
martin Posted November 16, 2008 Share Posted November 16, 2008 Hello,I'm a Firefox user, and AutoIt v3 user. I'm new to the forum, this is my first post, hope you can help me! Al the question are related to Firefox:Q1:The time of loading of pages is bugging me out, I put the script on sleep for a few seconds, and when I need to click something, the page is useally loaded, but not always.I've tried searching around with Window Info, but the windows doesn't change from title or anything. The only thing that changes is the Statusbar, but that information isn't given in Window Info... So my question, is it possible to make a "winwaitactive" command on the firefox status bar?Q2:Script 1While $bLoop = 1 $text = InputBox("Planet Checker", "Input land value") If $text < "850" Then $answer = MsgBox(4, "Too bad", "The number was under 850!") Else $answer = MsgBox(4, "Congratz", "The number was over 850!")WEndScript 2Send ("866{Enter}")It tried combining it like thisWhile $bLoop = 1 $text = InputBox("Planet Checker", "Input land value")Send ("866{Enter}") If $text < "850" Then $answer = MsgBox(4, "Too bad", "The number was under 850!") Else $answer = MsgBox(4, "Congratz", "The number was over 850!")WEndBut that doesnt work, only when inputbox has been filled in it will execute the send command. Any suggestions?Q3:Script 1While $bLoop = 1winactivate ("AutoIt Forums")sleep (5000)WEndScript 2While $bLoop = 1if winactive ("There's no internet") =1 ThenSend ("{F}5")WEndHow can I combine the control script (Script 2) with the main script (Script 1) without spamming the control script on every line in the main script?Greetings,ColdDeathWelcome to the forums ColdDeath You have managed to totally confuse me at your first attempt!Apart from the last script, where to send F5 you should useSend("{F5}")I can't offer much help because I don't understand what you want to do.Can you concentrate on the scripts 1 and 2 and explain what you want to happen? 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...
ColdDeath Posted November 16, 2008 Author Share Posted November 16, 2008 Welcome to the forums ColdDeath You have managed to totally confuse me at your first attempt!Apart from the last script, where to send F5 you should useSend("{F5}")I can't offer much help because I don't understand what you want to do.Can you concentrate on the scripts 1 and 2 and explain what you want to happen?Okay try to put it as simple as possible Question 1:When a page is loading, and I'm using Firefox by the way, under you can read which page he's currently loading. When he's done loading, you can read "Done".It's known that not every page uses the same time to load, and not everytime my internet connection is as fast as the previous attempt, etc, etc, etc.So, is there a way that my scripts executes a command as soon as the page is done loading?Question 2:In script 1: I've made an inputbox to check the data I just collectedIn script 2: I insert the data I just collected (in this case it's 866)In script 3: I tried to combine it, so that I get the inputbox and insert the data.That didn't work, what happens is: Inputbox asks to fill in the data, and waits till I've filled it in. When I've filled in the data it executes the send command.I want an inputbox, and directly send the data, so it can be checked.Question 3:Script 1While $bLoop = 1winactivate ("AutoIt Forums")sleep (5000)WEndScript 2While $bLoop = 1if winactive ("There's no internet") =1 ThenSend ("{F}5")WEndScript 2 is a monitor script, so script one doesn't faile. Now if I want just 1 script it will be like this:While $bLoop = 1winactivate ("AutoIt Forums")if winactive ("There's no internet") =1 ThenSend ("{F5}")Elsesleep (5000)if winactive ("There's no internet") =1 ThenSend ("{F}5")ElseEndIfEndIfWEndOkay in this case the script is a bit to small, but you probly get the point. I get a massive text file!Hope I made it clear!Greetings,ColdDeath Link to comment Share on other sites More sharing options...
ColdDeath Posted November 16, 2008 Author Share Posted November 16, 2008 (edited) These are the real scripts, it's based on a website that requires logging. So I thought it would be best not to show them... Okay, so these 3 scripts are infact Question 2. expandcollapse popup;Planet Checker.au3 $bLoop = 1 While $bLoop = 1 $text = InputBox("Planet Checker", "Input land value") If $text < "850" Then $text = InputBox("Planet Checker", "Input Planet Name") If $text <> "X" Then MouseClick ( "left", 287, 330 ) Sleep ( 8000 ) MouseClick ( "left", 423, 325 ) Sleep ( 8000 ) MouseClick ( "left", 784, 420 ) Sleep ( 8000 ) MouseClick ( "left", 624, 503 ) ShellExecute("C:\Documents and Settings\Roelofs\Bureaublad\Scripts\Explorer.au3","","","Run") Else ShellExecute("C:\Documents and Settings\Roelofs\Bureaublad\Scripts\X-planet.au3","","","Run") EndIf Else ShellExecute("C:\Documents and Settings\Roelofs\Bureaublad\Scripts\Explorer.au3","","","Run") EndIf WEndoÝ÷ Ù«¢+ØíáÁ±½ÉÈ)M±À ÈÔÀÀ¤((]¥¹Ñ¥ÙÑ Ìäì¡M¤±Ñ¥ ½¹ÅÕÍд5½é¥±±¥É½àÌäì¤(%]¥¹]¥ÑÑ¥Ù Ìäì¡M¤±Ñ¥ ½¹ÅÕÍд5½é¥±±¥É½àÌäì¤((5½ÕÍ ±¥¬ ÅÕ½Ðí±ÐÅÕ½Ðì°ÈØä°ÐÄÔ¤)M±À ÐÀÀÀ¤(((%5½ÕÍ ±¥¬ ÅÕ½Ðí±ÐÅÕ½Ðì°ÜÜà°ÌäÔ¤($%5½ÕÍ ±¥¬ ÅÕ½Ðí±ÐÅÕ½Ðì°ÜÜà°ÐÀÀ¤($$%5½ÕÍ ±¥¬ ÅÕ½Ðí±ÐÅÕ½Ðì°ÜÜà°ÐÀÔ¤($$$%5½ÕÍ ±¥¬ ÅÕ½Ðí±ÐÅÕ½Ðì°ÜÜà°ÐÄÀ¤($$$$%5½ÕÍ ±¥¬ ÅÕ½Ðí±ÐÅÕ½Ðì°ÜÜà°ÐÄÔ¤($$$$$%5½ÕÍ ±¥¬ ÅÕ½Ðí±ÐÅÕ½Ðì°ÜÜà°ÐÈÀ¤($$$$$$%5½ÕÍ ±¥¬ ÅÕ½Ðí±ÐÅÕ½Ðì°ÜÜà°ÐÈÔ¤)M±À àÀÀÀ¤((%5½ÕÍ ±¥É ÅÕ½Ðí±ÐÅÕ½Ðì°ÐÐÄ°ÌÈÄ°ÜØà°ÌÈĤ)M±À ÔÀÀ¤(%M¹ ÅÕ½ÐìyÅÕ½Ðì¤)M±À ÔÀÀ¤(((%]¥¹Ñ¥ÙÑ ÌäíA±¹Ð ¡ÈÌäì¤(%]¥¹]¥ÑÑ¥Ù ÌäíA±¹Ð ¡ÈÌäì¤(%͹ ÅÕ½ÐìyØÅÕ½Ðì¤($)M±À ÔÀÀ¤($%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤)M±À ÔÀ¤($$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤)M±À ÔÀ¤($$$%M¹ ÅÕ½Ðíí1QôÅÕ½Ðì¤($$$%M¹ ÅÕ½Ðíí1QôÅÕ½Ðì¤($$$%M¹ ÅÕ½Ðíí1QôÅÕ½Ðì¤)M±À ÔÀ¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤)M±À ÔÀÀ¤($$$$$%M¹ ÅÕ½Ðíí9QIôÅÕ½Ðì¤($$$$$$(]¥¹Ñ¥ÙÑ Ìäì¡M¤±Ñ¥ ½¹ÅÕÍд5½é¥±±¥É½àÌäì¤(%]¥¹]¥ÑÑ¥Ù Ìäì¡M¤±Ñ¥ ½¹ÅÕÍд5½é¥±±¥É½àÌäì¤($((%5½ÕÍ ±¥É ÅÕ½Ðí±ÐÅÕ½Ðì°ÐÌØ°ÌÀаÜØà°ÌÀФ)M±À ÔÀÀ¤(%M¹ ÅÕ½ÐìyÅÕ½Ðì¤)M±À ÔÀ¤(((%]¥¹Ñ¥ÙÑ ÌäíA±¹Ð ¡ÈÌäì¤(%]¥¹]¥ÑÑ¥Ù ÌäíA±¹Ð ¡ÈÌäì¤(%M¹ ÅÕ½ÐìyØÅÕ½Ðì¤)M±À ÔÀÀ¤($%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤)M±À ÔÀ¤($$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤)M±À ÔÀ¤($$%M¹ ÅÕ½Ðíí1QôÅÕ½Ðì¤)M±À ÔÀ¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤($$$$%M¹ ÅÕ½Ðíí -MA ôÅÕ½Ðì¤)M±À ÔÀÀ¤($$$$$%M¹ ÅÕ½Ðíí9QIôÅÕ½Ðì¤)á¥ÐoÝ÷ Ù«¢+Øì`µÁ±¹Ð)]¥¹Ñ¥ÙÑ$ Ìäì¡M¤±Ñ¥ ½¹ÅÕÍд5½é¥±±¥É½àÌäì¤)]¥¹]¥ÑÑ¥Ù$ Ìäì¡M¤±Ñ¥ ½¹ÅÕÍд5½é¥±±¥É½àÌäì¤)5½ÕÍ ±¥¬$$ ÅÕ½Ðí1ÐÅÕ½Ðì°ÈØä°ÐÄФ)M±À$$$ àÀÀÀ¤)5½ÕÍ ±¥¬$$ ÅÕ½Ðí1ÐÅÕ½Ðì°ÜÜÜ°ÐÄܤ)M±À$$$ àÀÀÀ¤)5½ÕÍ ±¥¬$$ ÅÕ½Ðí1ÐÅÕ½Ðì°ÈØä°ÐÄФ)M±À$$$ àÀÀÀ¤)5½ÕÍ ±¥¬$$ ÅÕ½Ðí1ÐÅÕ½Ðì°ÜÜÜ°ÐÄܤ)M±À$$$ àÀÀÀ¤)5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°ÈÜаÐàȤ)M±À$$$ àÀÀÀ¤)5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°ÐÈà°ÐÈÔ¤)M±À$$$ àÀÀÀ¤)M¹$$$ ÅÕ½ÐìÄÅÕ½Ðì¤)M±À$$$ ÔÀÀ¤)M¹$$$ ÅÕ½Ðíí¹ÑÉôÅÕ½Ðì¤)M±À$$$ àÀÀÀ¤)5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°ÈÜаÐÌÀ¤)M±À$$$ àÀÀÀ¤)5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°ØÈÄ°ÌÄĤ)M±À$$$ àÀÀÀ¤)5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°ØÌä°ÐÄà¤)M±À$$$ àÀÀÀ¤)]¡¥±ÀÌØí1½½ÀôÄ)]¥¹Ñ¥ÙÑ$ Ìäì¡M¤±Ñ¥ ½¹ÅÕÍд5½é¥±±¥É½àÌäì¤(%]¥¹]¥ÑÑ¥Ù$ Ìäì¡M¤±Ñ¥ ½¹ÅÕÍд5½é¥±±¥É½àÌäì¤(%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°Øäà°ÐØÀ¤(%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°Øäà°ÐØÔ¤(%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°Øäà°ÐÜÀ¤(%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°Øäà°ÐÜÔ¤(%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°Øäà°ÐàÀ¤(%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°Øäà°ÐàÔ¤(%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°Øäà°ÐäÀ¤(%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°Øäà°ÐäÔ¤(%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°Øäà°ÔÀÔ¤(%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°Øäà°ÔÄÔ¤(%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°Øäà°ÔÈÔ¤(%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°Øäà°ÔÌÔ¤(%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°Øäà°ÔÐÔ¤(%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°Øäà°ÔÔÔ¤($%M±À àÀÀÀÀ¤($%%]¥¹Ñ¥ÙÑ ÅÕ½Ðí5½é¥±±¥É½àÅÕ½Ðì¤ôÄQ¡¸($$%]¥¹Ñ¥ÙÑ$ Ìäì¡M¤±Ñ¥ ½¹ÅÕÍд5½é¥±±¥É½àÌäì¤($$%]¥¹]¥ÑÑ¥Ù$ Ìäì¡M¤±Ñ¥ ½¹ÅÕÍд5½é¥±±¥É½àÌäì¤($$%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°ÈÜаÐàȤ($$%M±À$$$ àÀÀÀ¤($$%5½ÕÍ ±¥¬$$ ÅÕ½Ðí±ÐÅÕ½Ðì°ÐÌÀ°àÔÀ¤($$%M±À$$$ àÀÀÀ¤($$%M¹$$$ ÅÕ½ÐìØÐÀÅÕ½Ðì¤($$%M¹$$$ ÅÕ½Ðíí¹ÑÉôÅÕ½Ðì¤($$%M¡±±áÕÑ$ ÅÕ½ÐíèÀäÈí½Õµ¹Ñ̹MÑÑ¥¹ÌÀäÈíI½±½ÌÀäÈí ÕÉÕ±ÀäÈíMÉ¥ÁÑÌÀäÈíáÁ±½ÉȹÔÌÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíIÕ¸ÅÕ½Ðì¤($$%á¥Ñ1½½À($%¹%(%]¹)á¥Ð Hope it helps!!! ColdDeath Edited November 16, 2008 by ColdDeath Link to comment Share on other sites More sharing options...
ColdDeath Posted November 16, 2008 Author Share Posted November 16, 2008 Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr HotKeySet("{ESC}", "OnAutoItExit") $iChildprocessId = _Childprocess() While Sleep(5000) WinActivate("AutoIt Forums") WEnd Func OnAutoItExit($iChildprocessId = $iChildprocessId) If $iChildprocessId Then ProcessClose($iChildprocessId) Exit EndFunc ;==>OnAutoItExit Func _Childprocess() If $CmdLine[0] = 0 Then Return Run("""" & @AutoItExe & """ """ & @ScriptFullPath & """ Childprocess") While Sleep(500) If WinActive("There's no internet") Then Send("{F5}") WEnd EndFunc ;==>_Childprocess I have no idea what u have done here... Could you explain it step by step? 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