Jump to content
Sign in to follow this  
Britbadboy

Screen Issue.

Recommended Posts

Hi there,

I am installing some software again and using AutoIT to automate it. But the problem comes in when I have to click the button on the page which starts the download process. Even though the screen ratio is same, but still the mouse co-ordinates are creating problems. Its working fine on some people's PCs but others it just creates a problem. As you will see in the script below I am sending #r funtion to start off the URL and go to the download page. But in some cases the window comes back as restored so I had to send the WinSetState function. Still the mouse co-ordinates are creating problem even though we all have the same 1024x768 screen resolution set. Please give me advice as to wot to do!!

WinMinimizeAll ( )

Send("#r")

If WinWaitActive("Run") Then

Send("http://download/standardsoftware/win/bre60502en/bre60502en.html")

EndIf

Sleep(1000) ;pauses the program for 1 second.

Send("{Enter}") ;enter button

Sleep(2000)

WinSetState("", "", @SW_MAXIMIZE)

Sleep(3000) ;pauses the program for 3 second.

Send("{PGDN}") ; scrolls down the page

Sleep(1000);

MouseMove (56, 409) ; points to the right button.

MouseClick("") ; clicks mouse.

;Finished

Share this post


Link to post
Share on other sites

Why not use the run command instead ?

Andre


What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!

Share this post


Link to post
Share on other sites

Hi there,

I am installing some software again and using AutoIT to automate it. But the problem comes in when I have to click the button on the page which starts the download process. Even though the screen ratio is same, but still the mouse co-ordinates are creating problems. Its working fine on some people's PCs but others it just creates a problem. As you will see in the script below I am sending #r funtion to start off the URL and go to the download page. But in some cases the window comes back as restored so I had to send the WinSetState function. Still the mouse co-ordinates are creating problem even though we all have the same 1024x768 screen resolution set. Please give me advice as to wot to do!!

WinMinimizeAll ( )

Send("#r")

If WinWaitActive("Run") Then

Send("http://download/standardsoftware/win/bre60502en/bre60502en.html")

EndIf

Sleep(1000) ;pauses the program for 1 second.

Send("{Enter}") ;enter button

Sleep(2000)

WinSetState("", "", @SW_MAXIMIZE)

Sleep(3000) ;pauses the program for 3 second.

Send("{PGDN}") ; scrolls down the page

Sleep(1000);

MouseMove (56, 409) ; points to the right button.

MouseClick("") ; clicks mouse.

;Finished

<{POST_SNAPBACK}>

Hello :lmao: look for this eaxampels and edit it for you!Or check this Helpfile from Autoit3!

#include <GUIConstants.au3>
HotKeySet ("{F5}", "Close")
$xPos = -1
$yPos = 0
$Title = " DirtyBanditos Test - Press F5 to exit !(01.01.2005) "
GUICreate ($Title, 520, 500, $xPos, $yPos, 0x00800000)
WinSetTrans ($Title, "", 200 )
GUISetState ()
While 1
 $get= GUIGetMsg ()
 Select
 Case $get= -3
    Exit
    EndSelect
    GetEcho ()
    GUICtrlCreatePic (@TempDir & "\Pick%201.gif", -1, -1, 700, 485)
    Sleep (60000)
    WEnd

Func GetEcho ()
 InetGet ("http://people.freenet.de/SacredBugedShop/Pick%201.gif", @TempDir & "\Pick%201.gif", 1, 0)

EndFunc
    
Func Close ()
Exit
EndFunc
Edited by DirtyBanditos

Share this post


Link to post
Share on other sites

Hello  :lmao: look for this eaxampels and edit it for you!Or check this Helpfile from Autoit3!

#include <GUIConstants.au3>
HotKeySet ("{F5}", "Close")
$xPos = -1
$yPos = 0
$Title = " DirtyBanditos Test - Press F5 to exit !(01.01.2005) "
GUICreate ($Title, 520, 500, $xPos, $yPos, 0x00800000)
WinSetTrans ($Title, "", 200 )
GUISetState ()
While 1
 $get= GUIGetMsg ()
 Select
 Case $get= -3
    Exit
    EndSelect
    GetEcho ()
    GUICtrlCreatePic (@TempDir & "\Pick%201.gif", -1, -1, 700, 485)
    Sleep (60000)
    WEnd

Func GetEcho ()
 InetGet ("http://people.freenet.de/SacredBugedShop/Pick%201.gif", @TempDir & "\Pick%201.gif", 1, 0)

EndFunc
    
Func Close ()
Exit
EndFunc

<{POST_SNAPBACK}>

Hi there,

this doesnt explain me anything, am a new beginner in this AutoIt thingi so please explain a bit more.

Share this post


Link to post
Share on other sites

Hi there,

this doesnt explain me anything, am a new beginner in this AutoIt thingi so please explain a bit more.

<{POST_SNAPBACK}>

Hello Britbadboy Look on your Autoit3 folder and open The Help.chm exe and look wat you ned ,you can find many Helps for Autoit3 :lmao:

Good look and Happy Coding!

Or use The Search func on His forums!It is Nice :)

It gif alot Exampels on it! o:)

Edited by DirtyBanditos

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...