Jump to content

after upgrade from Windows 2000 to XP script not working


Recommended Posts

After I have upgraded from Windows 2000 to XP my script sporadically works.

Here's part of script where it messes up. Any suggestions about changes from 2000 and XP, or debugging tips, would help. The code places the value of $CurrentManifest variable into a text box on the screen. Sporadically the value is placed into the wrong box. The code that places the $CurrentManifiest number is commented in CAPS below.

If _IsPressed("0D", $dll) Then

If StringLen(ControlGetText("OnBase Client (OBSERVER)","&Index",2287)) > 0 Then

ControlFocus("OnBase Client (OBSERVER)","",2696)

Send("{TAB}")

$CurrentManifest = ControlCommand("OnBase Client (OBSERVER)","",718,"GetSelected","")

ControlFocus("OnBase Client (OBSERVER)","",718)

Call ("DeleteNewTrip")

ControlFocus("OnBase Client (OBSERVER)","",718)

Send ("!i")

Sleep(30)

$manifest = ControlCommand("OnBase Client (OBSERVER)","",718,"GetSelected","")

If $NewTrip = "" Then

If ($manifest) = "" Then

Sleep (30)

;THE NEXT LINE IS THE SUSPECTED PROBLEM

Send($CurrentManifest)

Call ("DeleteNewTrip")

ControlFocus("OnBase Client (OBSERVER)","",2696)

If ($CurrentManifest) = "" Then

send("{TAB}")

Else

send("{TAB}{TAB}")

EndIf

Else

$CurrentManifest = $manifest

Call ("DeleteNewTrip")

EndIf

Else

Send("{Delete}")

EndIf

Else

;do nothing

EndIf

Link to comment
Share on other sites

Check what you have compared to what is returned from the AutoIt Window Info tool.

Make sure you do a trace of each function so you can see errors for failing.

Cheers,

Brett

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