Sign in to follow this  
Followers 0
skylang

Script crashing Word

4 posts in this topic

I have a script that automates a function in MS Word. A VBA script in Word creates a series of controls and the AutoIt script actuates them.

On a particular control, the cursor goes to a particular button and presses it, then Word crashes.

Yet when I go through the procedure manually, the Word script works fine.

The script I am using at this point is:

MouseMove(858,40)

MouseDown("left")

MouseUp("left")

;Wait until the TM tools window opens

WinWait("TM tools","")

If Not WinActive("TM tools","") Then WinActivate("TM tools","")

WinWaitActive("TM tools","")

By putting MsgBoxes after the first 3 lines I determined that they are completing properly. The MouseUp command completes, but instead of opening the "TM tools" window, Word crashes.

How can I determine what is crashing Word? It seems to be the AutoIt interaction, because doing it manually causes no problems.

Any ideas?

Share this post


Link to post
Share on other sites



no ideas, pls try MouseClick("left", 858,40, 0)

instead of

MouseMove(858,40)

MouseDown("left")

MouseUp("left")

Maby someone can help if you can provide data to replicate problem


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

no ideas, pls try MouseClick("left", 858,40, 0)

instead of

MouseMove(858,40)

MouseDown("left")

MouseUp("left")

Maby someone can help if you can provide data to replicate problem

Thanks, I'll try it. I've had to move on for today so I'll try it next week.

Share this post


Link to post
Share on other sites

It still appears to be some conflict between the two programs.

I tried by letting AutoIt run to the point just before it crashes, then taking over manually. It crashes at the same point.

Then I stopped just before that point, stopped AutoIt (Ctrl+ Brk), closed AutoIt completely, continued manually - Word crashes.

Yet the Word script runs fine if I never started AutoIt after opening Word. What gives?

Unfortunately, the Word script is a rather complex piece of commercial proprietary software that runs as a template within Word - it can't be run in pieces, but you would have to install the template and learn how to use it.

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