unigrad17 Posted September 30, 2009 Share Posted September 30, 2009 I am trying to write an AutoIT script to record the computer processing time relating to performing specific tasks within the Pro/ENGINEER software program. I have recorded mapkeys to perform certain functions and have written a script to try to record the time it takes to perform these. Here is a short snippet of the script that I am using: $begin4 = TimerInit() Send ("oaip") ; oaip is a mapkey within Pro/E to open a specified part WinWaitActive("MGTEST") ; MGTest is the name of the part that opens from the previous mapkey $dif4 = TimerDiff($begin4) I then have an Excel spreadsheet set up to record these time differences. This script works just fine and records results. However, the "MGTEST" window becomes active before the actual open part function has completed, which is really the time that I am looking to measure. Does anyone have any ideas to force the TimerDiff function to wait until all of the computer processing regarding opening the Pro/E part has completed? Any help would be much appreciated. Thanks. Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 30, 2009 Share Posted September 30, 2009 I am trying to write an AutoIT script to record the computer processing time relating to performing specific tasks within the Pro/ENGINEER software program. I have recorded mapkeys to perform certain functions and have written a script to try to record the time it takes to perform these. Here is a short snippet of the script that I am using:$begin4 = TimerInit() Send ("oaip") ; oaip is a mapkey within Pro/E to open a specified partWinWaitActive("MGTEST") ; MGTest is the name of the part that opens from the previous mapkey$dif4 = TimerDiff($begin4)I then have an Excel spreadsheet set up to record these time differences. This script works just fine and records results. However, the "MGTEST" window becomes active before the actual open part function has completed, which is really the time that I am looking to measure. Does anyone have any ideas to force the TimerDiff function to wait until all of the computer processing regarding opening the Pro/E part has completed?Any help would be much appreciated.Thanks.TimerDiff() is doing exactly what it's supposed to. Don't run it until you are ready for the results. So, how do you know it's done? What can the script check for that will reliably indicate "the actual open part function has completed"? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
unigrad17 Posted October 1, 2009 Author Share Posted October 1, 2009 TimerDiff() is doing exactly what it's supposed to. Don't run it until you are ready for the results. So, how do you know it's done? What can the script check for that will reliably indicate "the actual open part function has completed"? I am trying to figure out what I can look for to perform the TimerDiff() command. I have contacted PTC (the software company that makes Pro/E) to see if they have any idea as to what I could reference that would relate to this process being completed. I do know that there is an internal dashboard built into Pro/E that gives the text "Check In Succeeded" when the process is done, but I don't know how to write a script to "look at" this dashboard for this text to then initialize the TimerDiff() command. Does anyone have any ideas as to how text within a program can be referenced? Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 1, 2009 Share Posted October 1, 2009 I am trying to figure out what I can look for to perform the TimerDiff() command. I have contacted PTC (the software company that makes Pro/E) to see if they have any idea as to what I could reference that would relate to this process being completed. I do know that there is an internal dashboard built into Pro/E that gives the text "Check In Succeeded" when the process is done, but I don't know how to write a script to "look at" this dashboard for this text to then initialize the TimerDiff() command. Does anyone have any ideas as to how text within a program can be referenced?Examine the window with AU3Info.exe, the AutoIt Window Info tool. That will tell you what controls and text on the window that AutoIt can see. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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