Sign in to follow this  
Followers 0
neo007

au3record.exe is not accurate ?

15 posts in this topic

Hi,

The first time I saw and tried this tool. It's included in the full installation. I find that its filename is au3record.exe, not au3recorder.exe, as in http://www.autoitscript.com/autoit3/scite/docs/AU3record.htm.

I wrote a code with the help with this tool. It functions great, but the mouse move distance/position it records is not accurate, I have to re-measure several points in the screen with the help of ac3info.exe and fix the code. Anybody please tell, is this bug fixed in any recent version? ---- the time attribute of my ac3record.exe is 2006/9/5.

Thanks.

Share this post


Link to post
Share on other sites



Thanks for the link to the document error - maybe someone will find the time to update that.

I have the same file and date stamp for au3record.exe as you and the very small test that I did with it just now - worked as expected. Please consider making a sample script using au3record.exe that illustrates the problem that you are having - maybe using notepad or some other common application like Calc.exe. Then maybe someone can duplicate your problem.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

I have the same file and date stamp for au3record.exe as you and the very small test that I did with it just now - worked as expected. Please consider making a sample script using au3record.exe that illustrates the problem that you are having - maybe using notepad or some other common application like Calc.exe. Then maybe someone can duplicate your problem.

I did a test with Calc.exe, with the following steps:

1, run Calc.exe, set it Scientific mode;

2, run au3recorder.exe and begin recording;

3, click upper-right corner of the upper-right button "c";

4, move mouse and click lower-left corner of the lower-left button "Dat";

5, end recording.

I got the code, in which the mouse move part is: (between the two click)

MouseMove(13,287)

Anybody please do a test and check this..... I wonder if au3record is dependant on screen resolution---- mine is 1280x1024.

Share this post


Link to post
Share on other sites

AU3Record sets MouseCoordMode to client area ... if you do not keep that setting then coords are off...

Lar.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
Share on other sites

AU3Record sets MouseCoordMode to client area ... if you do not keep that setting then coords are off...

No. That mode is not client area.

Here's the code:

Opt("WinWaitDelay",100)

Opt("WinTitleMatchMode",4)

Opt("WinDetectHiddenText",1)

Opt("MouseCoordMode",0)

Share this post


Link to post
Share on other sites

I did a test with Calc.exe, with the following steps:

1, run Calc.exe, set it Scientific mode;

2, run au3recorder.exe and begin recording;

3, click upper-right corner of the upper-right button "c";

4, move mouse and click lower-left corner of the lower-left button "Dat";

5, end recording.

I got the code, in which the mouse move part is: (between the two click)

MouseMove(13,287)

Anybody please do a test and check this..... I wonder if au3record is dependant on screen resolution---- mine is 1280x1024.

Here is the output of au3record...
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("Calculator","")
If Not WinActive("Calculator","") Then WinActivate("Calculator","")
WinWaitActive("Calculator","")
MouseMove(464,106)
MouseDown("left")
MouseUp("left")
MouseMove(14,291)
MouseDown("left")
MouseUp("left")oÝ÷ Û­Ø^±ÊÞzzÞ²n¶*'±ëm£]¼ÓtÛázÇ+kº{±ìiyË^tw«z+-ê.¶­¡ö®Þ·¢·ZºÚ"µÍÜ
    ][ÝÕÚ[ØZ][^I][ÝËL
BÜ
    ][ÝÕÚ[]SX]Ú[ÙI][ÝË
BÜ
    ][ÝÕÚ[]XÝY[^    ][ÝËJBÜ
    ][ÝÓ[ÝÙPÛÛÜ[ÙI][ÝË
BÚ[ØZ]
    ][ÝÐØ[Ý[]Ü][ÝË   ][ÝÉ][ÝÊBYÝÚ[XÝ]J    ][ÝÐØ[Ý[]Ü][ÝË   ][ÝÉ][ÝÊH[Ú[XÝ]]J ][ÝÐØ[Ý[]Ü][ÝË   ][ÝÉ][ÝÊBÚ[ØZ]XÝ]J   ][ÝÐØ[Ý[]Ü][ÝË   ][ÝÉ][ÝÊB[ÝÙS[ÝJ

L
B[ÝÙQÝÛ ][ÝÛY ][ÝÊB[ÝÙU
    ][ÝÛY ][ÝÊB[ÝÙS[ÝJLËM
B[ÝÙQÝÛ ][ÝÛY ][ÝÊB[ÝÙU
    ][ÝÛY ][ÝÊ
...with the screen resolution set to 1024x768.

The script runs as expected.

Both tests were made on XP SP2.

What OS are you using and what happens when you run the first block of code exactly as I've posted it?


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Happy NewYear !!!

Here's what I got. Don't know whats wrong....

Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("Calculator","")
If Not WinActive("Calculator","") Then WinActivate("Calculator","")
WinWaitActive("Calculator","")
MouseMove(523,113)
MouseDown("left")
MouseUp("left")
MouseMove(12,287)
MouseDown("left")
MouseUp("left")

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

...What OS are you using and what happens when you run the first block of code exactly as I've posted it?

...or what happens when you run your code?

How far off is the second click?

Are you running the code exactly as posted?

Or are you putting it into another script and then it "breaks"?

OS = XP?

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

It seems that au3record could only record as Mousecoordmode = 0 = relative coords to the active window. How can I do it as

= 1 = absolute screen coordinates (default) ?

Share this post


Link to post
Share on other sites

...or what happens when you run your code?

------ I just copy the code au3record.exe created into Scite and make it a au3 file, when running it, mouse click happens in wrong point.

How far off is the second click?

------ As the code posted above, maybe 7 pixel away?

Are you running the code exactly as posted?

------ Yes.

Or are you putting it into another script and then it "breaks"?

------ Yes, when I add this into a bigger code, same thing happens so it fails to click button and breaks.

OS = XP?

------ yes.

Share this post


Link to post
Share on other sites

...How can I do it as = 1 = absolute screen coordinates (default) ?

Normally, I just attempt to answer the question that is asked without out asking why - but I just gotta ask: Why would you want to have the mouse click with respect to the screen. Are you moving the Calc window to a certain position on the screen before clicking on it? If yes, then run one line of code (a WinMove line) on the window of interest and then use au3record to do the rest.

You can set MouseCoordMode = 0 for the "Calc" window and then set it back to MouseCoordMode = 1 for the rest of your code. You can toggle it as often as you like.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Normally, I just attempt to answer the question that is asked without out asking why - but I just gotta ask: Why would you want to have the mouse click with respect to the screen. Are you moving the Calc window to a certain position on the screen before clicking on it? If yes, then run one line of code (a WinMove line) on the window of interest and then use au3record to do the rest.

You can set MouseCoordMode = 0 for the "Calc" window and then set it back to MouseCoordMode = 1 for the rest of your code. You can toggle it as often as you like.

Thanks. I'm thinking of ending this topic. I know what's going on but it's just hard to express well with english, and I don't want to bother you guys too much.....

As I mentioned, all is about "inaccurate", so I mentioned: "I got the code, in which the mouse move part is: (between the two click)

MouseMove(13,287)".

So, "Are you moving the Calc window to a certain position on the screen before clicking on it?"----I think only "MouseMove(13,287)" matters---since the MouseCoordMode=0. Whether or not I move Calc window is about other lines of code.

Share this post


Link to post
Share on other sites

...hard to express well with english, and I don't want to bother you guys too much.....

...not a bother, I was just wondering.

I have trouble with English too - and it is my only language :-(


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

LOL. Thanks for all the help.

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  
Followers 0