Jump to content

looping not working in Windows 8 !! Please help


Go to solution Solved by BrewManNH,

Recommended Posts

#include <IE.au3>
Local $oIE = _IECreate("http://google.com")
_IELoadWait($oIE)
While 1
_IENavigate($oIE, "http://mywebsite")
_IELoadWait($oIE)
_IELinkClickByText($oIE, "1oZMQ2E")
sleep(600)
WEnd

this script is doing endless looping in windows xp, 7 without any  problem !! but on Windows 8 its not working :(( ..only opening page and remains there...no looping  Please help.

Edited by debkol35
Link to comment
Share on other sites

  • Moderators

Works for me as well, in WIN8 and 8.1. I am curious why you need to reopen the website every 600ms and click on the link.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

BTW, I wouldn't bother asking the exact same questions here and on stackoverflow, usually you end up getting the same people answering questions about AutoIt in both places.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Works for me as well, in WIN8 and 8.1. I am curious why you need to reopen the website every 600ms and click on the link.

ohh God !! here I feel like I am being investigated for murder trial !!! It was just a demo script. I kept 600ms because in Win8 looping not working on my pc...so I didn't want to wait for 15 minutes to check if looping is working !!

#include <IE.au3>
Local $oIE = _IECreate("http://google.com")
While 1
_IENavigate($oIE, "http://debhl.mepage.us/DEB/")
_IELoadWait($oIE)
Local $oLinks = _IELinkGetCollection($oIE)
Local $iNumLinks = @extended
_IELinkClickByIndex($oIE, Random(0, $iNumLinks))
_IELoadWait($oIE)
sleep(180000)
WEnd

This is the site I am working on it. I will develop my site once script is ready !! Links will be replaced by url of flash games that I will host !!

I am using latest Win8 x64 latest AutoIt but still same problem :( Mine is IE 11. OS 8.1 64bit

@

title="looping not working in Windows 8 !! Please help: post #4">#4 BrewManNH

I an completely new in this script world with 0 knowledge. I am trying to take help from everyone I can. So, I was searching for it in google, I find that site. I posted there. I didn't know same people will answer here and there. Besides..no offence guys but I feel this forum little hostile !! :( Dont know why !! I am not asking  to help me to kill people !! ofcorurse trying to make bot... autoit is for this purpose no?

If you guys feel bothered ...I am sorry !!

 

I tested on a friend's 8.1 OS ...working fine there...so strange !! it must be  something wrong with my os :( Sorry for bothering u guys :(

Edited by debkol35
Link to comment
Share on other sites

  • Developers

@debkol35,

The reason you are treated the way you are has all to do with the way you are asking your questions.

They are spread over multiple threads, are vague and you act impatient.

I of course can also see your email address and did a quick check on hits for that which let to even more sites where you are asking the questions but also some other vague hits.

Conclusion for this moment: You fully fit the profile of a young person that needs something quickly and we need to watch out for.

You can say it is harsh, but there is a history to all behaviour and we have quite some around here which let to this behaviour.

So, when you want us to approach you differently, you will have to change your behaviour around here and try to be a lot less vague about your intentions.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

@debkol35,

The reason you are treated the way you are has all to do with the way you are asking your questions.

They are spread over multiple threads, are vague and you act impatient.

I of course can also see your email address and did a quick check on hits for that which let to even more sites where you are asking the questions but also some other vague hits.

Conclusion for this moment: You fully fit the profile of a young person that needs something quickly and we need to watch out for.

You can say it is harsh, but there is a history to all behaviour and we have quite some around here which let to this behaviour.

So, when you want us to approach you differently, you will have to change your behaviour around here and try to be a lot less vague about your intentions.

Jos

 

"I of course can also see your email address and did a quick check on hits for that which let to even more sites where you are asking the questions but also some other vague hits."

Dont know what you mean !! Is it crime to go to other sites for help? or is it crime to ask about different question? I dont know if you guys took some scripting course to become expert on Autoit, but a person who has 0 knowledge wants to do something, needs to go here and there, ask questions which might sound vague or idiotic for experts !!

I am trying to make a bot..when I am facing problem, what should I do? sit silently ? or do research? I am searching for lot of things to understand how they work !! Dont know how it is wrong in your eyes !!

"So, when you want us to approach you differently, you will have to change your behaviour around here and try to be a lot less vague about your intentions."

In every topic I made I placed my intention very clear, what I intended to do. I didn't know I also need to tell you from A to Z !! what I will make, why I will make, When I will make !! Other people also create topic and mentioned about their problem. I didn't see them writing history what they are making, why they are making, when they are making !! I never bump any topic !!

In most topic I made, I didn't create double post !! I made topic and then rather sitting quietly waiting for reply, I did search, study and few things  I did myself and posted and marked as solved too !!

I didn't know that you have placed restriction for young person that needs something quickly !! Dont know why you need to watch out from them too !! I mean, this forum is for helping people no? is it for something else? I need to be old, slow, no intention to know something new? Do i need to fill these category and only then you will treat me ok?

Edited by debkol35
Link to comment
Share on other sites

  • Developers

mmm... ok one last try:

1. Do the search on your used email address here and you understand what I mean. There are some dodgy hits there which you may or may not are the reason of.

2. It is clear you are making a Bot which is the prime reasons all questions are asked.

3. I haven't said you misbehaved because else you would have noticed already as we are reasonable active when it comes to moderation, although trying to run a relaxed forum.

So, I was just trying to explain to you why you get the responses you have seen. Either accept it or not ...  your choice. :)

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

mmm... ok one last try:

1. Do the search on your used email address here and you understand what I mean. There are some dodgy hits there which you may or may not are the reason of.

2. It is clear you are making a Bot which is the prime reasons all questions are asked.

3. I haven't said you misbehaved because else you would have noticed already as we are reasonable active when it comes to moderation, although trying to run a relaxed forum.

So, I was just trying to explain to you why you get the responses you have seen. Either accept it or not ...  your choice. :)

Jos

 

Ok....I understand..its true that I am very impatience specially when it relates to computer matter !! I am sorry. :( I accept everything. .. wont happen again. :(

 

I found the looping problem !!

after looping 4 or 5 times successfully, sometimes, script unable to find link to click, and then it stops !!

Error

--> IE.au3 T3.0-1 Warning from function _IELinkClickByIndex, $_IESTATUS_NoMatch
--> IE.au3 T3.0-1 Error from function _IENavigate, $_IESTATUS_COMError (-2147352567)

so, looking for an option so that error will be ignored and continue the looping. :)

Edited by debkol35
Link to comment
Share on other sites

Not sure what you're doing wrong there, but I believe its impossible for AutoIt to try and click a link that doesn't exist since you already got all the links in that page with _IELinkGetCollection, I could be wrong tho, unless the page updated its links list and removed the one AutoIt was trying to click.

I ran your script for half an hour straight (Note that Sleep is removed meaning it was loading every page once the previous one is done loading) and ran into zero errors on SciTE,

#include <IE.au3>
Local $oIE = _IECreate("http://google.com")
While 1
_IENavigate($oIE, "http://debhl.mepage.us/DEB/")
_IELoadWait($oIE)
Local $oLinks = _IELinkGetCollection($oIE)
Local $iNumLinks = @extended
_IELinkClickByIndex($oIE, Random(0, $iNumLinks))
_IELoadWait($oIE)
;~ sleep(180000)
WEnd
Edited by Palestinian
Link to comment
Share on other sites

 

Not sure what you're doing wrong there, but I believe its impossible for AutoIt to try and click a link that doesn't exist since you already got all the links in that page with _IELinkGetCollection, I could be wrong tho, unless the page updated its links list and removed the one AutoIt was trying to click.

I ran your script for half an hour straight (Note that Sleep is removed meaning it was loading every page once the previous one is done loading) and ran into zero errors on SciTE,

#include <IE.au3>
Local $oIE = _IECreate("http://google.com")
While 1
_IENavigate($oIE, "http://debhl.mepage.us/DEB/")
_IELoadWait($oIE)
Local $oLinks = _IELinkGetCollection($oIE)
Local $iNumLinks = @extended
_IELinkClickByIndex($oIE, Random(0, $iNumLinks))
_IELoadWait($oIE)
;~ sleep(180000)
WEnd

 

First of all, thank you so much for your reply and help :)

I didn't update any links on that page as you can see ..i am just doing test on fake links. thing is...

This below code is supposed to get all links there and open one of them randomly !!

Local $oLinks = _IELinkGetCollection($oIE)
Local $iNumLinks = @extended
_IELinkClickByIndex($oIE, Random(0, $iNumLinks))

but for some reason, this warning msg is keep coming once in while.

I understand u removed the sleep time but after opening a random link, I need it to wait for 20 minutes (to load flash game and play a little), only after that it should go back to ( http://debhl.mepage.us/DEB/ ) and pick another random link !!

3250a1dc106bf25f90675fa6459f1c55.png

running it for 3 hours...its keep showing on SciTE but looping not stopped yet !!

previous time, when the below error came, it stopped looping...

"--> IE.au3 T3.0-1 Error from function _IENavigate, $_IESTATUS_COMError (-2147352567)"

Edited by debkol35
Link to comment
Share on other sites

  • Solution

Random returns a floating point number between 0 and the max. If you want only integers returned use 1 for the third parameter. Next, is there a 0 link index, probably not, so use 1 to $iNumLinks instead of 0 in the Random function.

Reread the function description, so that line's wrong.

Use 0 to $iNumlinks -1 because it appears like it's a zero based list of indexes.

Edited by BrewManNH

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Random returns a floating point number between 0 and the max. If you want only integers returned use 1 for the third parameter. Next, is there a 0 link index, probably not, so use 1 to $iNumLinks instead of 0 in the Random function.

Reread the function description, so that line's wrong.

Use 0 to $iNumlinks -1 because it appears like it's a zero based list of indexes.

 

Thank you for your reply and help.

So... I set it like this?

Local $oLinks = _IELinkGetCollection($oIE)
Local $iNumLinks = @extended
_IELinkClickByIndex($oIE, Random(0, $iNumLinks -1))

and it worked awesomely ..no more warning :)

can you please tell me what is wrong with

_IELoadWaitTimeout()

I set this:-

#include <IE.au3>
_IELoadWaitTimeout(5000)
Local $oIE = _IECreate("http://google.com/")
_IENavigate($oIE, "http://debhl.mepage.us/DEB/")
While 1
Local $oLinks = _IELinkGetCollection($oIE)
Local $iNumLinks = @extended
_IELinkClickByIndex($oIE, Random(0, $iNumLinks -1))
Sleep ( 10000 )
_IENavigate($oIE, "http://debhl.mepage.us/DEB/")
_IELoadWait($oIE)
WEnd

I am keep getting this warning message in SciTE

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\betatest.au3"    
--> IE.au3 T3.0-1 Warning from function _IELoadWait, $_IESTATUS_LoadWaitTimeout
--> IE.au3 T3.0-1 Warning from function _IELoadWait, $_IESTATUS_LoadWaitTimeout
--> IE.au3 T3.0-1 Warning from function _IELoadWait, $_IESTATUS_LoadWaitTimeout
--> IE.au3 T3.0-1 Warning from function _IELoadWait, $_IESTATUS_LoadWaitTimeout
Edited by debkol35
Link to comment
Share on other sites

Yes, it's telling you that the time limit to wait was passed. So in other words, your 5 seconds passed without the page loading.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...