Dana Posted February 28, 2012 Share Posted February 28, 2012 (edited) Has anybody seen this before?I don't think it's an AutoIT issue per se, but I can't explain it. I have a compiled AutoIT script to provide integration between my CAD package and SmarTeam (our document management system). Basically it gathers information from the CAD system and stuffs it into a new entry "card" in SmarTeam. It worked fine until yesterday, when it simply hung up at the point where it's supposed to switch to a different tab (page) on the card and continue entering information.ControlClick("ENOVIA SmarTeam", "", "TAdvGlowButton38") ControlSend("ENOVIA SmarTeam", "", "TAdvGlowButton38", "e") ; go to details tab Sleep(1000) While ControlSetText("ENOVIA SmarTeam", "", "TFBEdit1", $layname & ".pdf") <> 1 WEndThe first line in the above snippet clicks a button (as identified by the AutoIT Windo Info app) which displays a dropdown list. The second line selects the "Details" tab, it sleeps one second to allow time for the tab to display, and continues stuffing information into it.The problem is with TAdvGlowButton38... previously the button to access the dropdown was TAdvGlowButton41, but somehow it changed to 38... and 41 was now assigned to the "Cancel" button... so the card simply closed (canceled) and it then looped forever waiting for a nonexistent TFBEdit1 control.Easy to fix, but why would it happen? The strange thing is that it worked for several years the way it was, and the SmarTeam program was not updated or reinstalled, reconfigured, or anything, so nothing should have changed. Could a Windows update or something like that have changed the numeric assignment of buttons in an application? I would think it would be hard coded in the application, whether the programmer assigns the codes or they're assigned at compile time. Edited February 28, 2012 by Dana Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now