Jump to content

Recommended Posts

Posted

I'm trying to build a autoit script,

but when I make a WinActivate,the program stops,why?(and the program is running correctly).

Script:

MouseMove(1049,50,100);

WinActivate("agBot"); STOP

MouseClick("left");

MouseClick("left");

MouseMove(0,50,100);

It move the mouse once,then activate the window,and then nothing.

How can I prevent the stop of the script?

Thx.

Posted

wait before activating

WinWait()

than

winActivate()

check If @Error than

MsgBox(0, "Error", @Error, 10)

Something really wierd,

when i activate the script and then that program,it stops,and then when i ALT+TAB to other window,

The mouse is suddenly at another place.

how do i fix this problem?

thx.

Posted

Something really wierd,

when i activate the script and then that program,it stops,and then when i ALT+TAB to other window,

The mouse is suddenly at another place.

how do i fix this problem?

thx.

check with the following code

$Win_Name = "agBot"
Opt("WinTitleMatchMode", 2)
MouseMove(1049,50,100);
If WinExists($Win_Name, "") Then
    WinActivate($Win_Name, "")
    If @error Then
        MsgBox(64, "Error", @Error, 60)
    EndIf
Else
    MsgBox(0, "Hi,", "Window does not exists and script can't activate it.")
EndIf
MouseClick("left");
MouseClick("left");
MouseMove(0,50,100);
Unresolved topics:1- Please help me in Editing or replacing a page in FireFox and IE.Please have a look at them.
Posted

i think your problem it's the name of win

use AutoIt Window Info to get the agbot corrent name or just write all what you see in caption of window of agbot(there are [space character]alots)

for exapmple i use agbot and my win it's named "agBot (2.4.13) - Powered by The 6th revolution (http://www.rev6.com/)"

good luck;)

Posted (edited)

I tried the code mentioned above,

the "agBot" window really gets a focus,but then the script stops.(the mouse don't move,no clicks)

what can I do?

I tried the full name of the window "agBot (2.4.4) - Powered by The 6th revolution (http://www.rev6.com/)"

And still the script stops,It makes the same thing for other programs as well.

Edited by talss
Posted

I tried the code mentioned above,

the "agBot" window really gets a focus,but then the script stops.(the mouse don't move,no clicks)

what can I do?

I tried the full name of the window "agBot (2.4.4) - Powered by The 6th revolution (http://www.rev6.com/)"

And still the script stops,It makes the same thing for other programs as well.

give some sleep() before using any mouse move. see my code posted here before and give sleep before every function like this.

Sleep(3000)

MouseMove(...

Sleep(4000)

MouseClick(...

?

Unresolved topics:1- Please help me in Editing or replacing a page in FireFox and IE.Please have a look at them.

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
×
×
  • Create New...