Jump to content

WinMove - Internet Explorer Issue


Julenissen
 Share

Recommended Posts

Hi everyone :)

Since this is my first post on this forum, feel free to send me any notes regarding wrong topic, using forbidden words etc.

This is my first day with AutoIT, so don't be surprised if the soultion of my problem might be pretty simple ;p So far I have tried my best with C++ so I am not a total newbie at scripting (I guess...)

 I am currently working on a simple script that opens web browser and then specific website (with weather forcasts). I would like to use WinMove function in order to click the right spots on the website via MouseClick function and thus generating a right forecast. 

I have tried the script on Google Chrome and it works like charm, but when I tried to move web browser window via WinMove script didn't react at all, only the part with running IE and mouse clicking worked. Does anyone might have a clue what could be the reason for that? Below you can find the script

PS. Don't worry to run it. It's Polish website run by on of the universities  so no viruses included ;p You can change the display language to English.

Run ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe ""http://www.meteo.pl/""")
WinWaitActive("METEO.PL - Google Chrome","",10)
WinMove ( "METEO.PL - Google Chrome", "", 0, 0, 960, 1040 )
MouseClick("", 164, 492, 1)
Sleep(1000)
MouseClickDrag("", 944, 425, 944, 599)
Sleep(1000)
MouseClick("", 785, 589, 1)
Sleep(1000)
WinMove ( "Meteorogramy - meteorograms - Google Chrome", "", 960, 0, 960, 1040 )

Sleep(10000)



Run ("C:\Program Files\Internet Explorer\iexplore.exe ""http://www.meteo.pl/""")
WinWaitActive("METEO.PL - Windows Internet Explorer","",10)
WinMove ( "METEO.PL - Windows Internet Explorer", "", 960, 0, 960, 1040 )
MouseClick("", 0, 0, 1)
Sleep(1000)
MouseClickDrag("", 944, 425, 944, 599)
Sleep(1000)
MouseClick("", 0, 0, 1)
Sleep(1000)
WinMove ( "Meteorogramy - meteorograms - Windows Internet Explorer", "", 960, 0, 960, 1040 )

I would be very grateful for any advice.

Cheers ;)

Paul

 

Link to comment
Share on other sites

There is a better way to approach this. Most weather services use airport codes or zip codes for locations. I don't have time at the moment but I remember seeing something like that in this forum somewhere when someone made a weather app. Use the search function and I bet you can find it.

cheers!

-Bert

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...