Jump to content

Help with script


Recommended Posts

Hi gys

I have created a script that helps me do an anlysis using a software. And it works when I use Sleep() command but when I cnage it it with ProccesWait () command it actualy jumps back to window that assk about creating large file which is copule of lines up in the script file and pauses there. Then when I manulay click buttons it finishes the rest of the scrip fine. Any idea about what is going on here. Here

CODE
;SELECT PI-STDREZIDUA MATRIX

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1")

ControlCommand("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1", "ShowDropDown", "")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1", "{DOWN 4}")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1", "{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

;Save text file withouth footer and extreme persons

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton2")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton2", "!a")

;ProcessWait("RUMM2020.EXE")

WinWaitActive("Creating Large File")

ControlFocus("Creating Large File", "", "Button1")

ControlSend("Creating Large File", "", "Button1", "{ENTER}")

WinWaitActive("Output Specifications for Footer")

ControlFocus("Output Specifications for Footer", "", "Button2")

ControlSend("Output Specifications for Footer", "", "Button2", "!n")

WinWaitActive("Output Specifications for Extreme Persons")

ControlFocus("Output Specifications for Extreme Persons", "", "Button2")

ControlSend("Output Specifications for Extreme Persons", "", "Button2", "!n")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

;PAUSE SCRIPT UNTIL PIMATRIX FILE IS WRITEN. TIME IS IN MILISECONDS

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

;Sleep (60000)

ProcessWait("RUMM2020.EXE")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

;CLOSING THE PROJECT

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

WinWaitActive("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton3")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton3", "{Enter}")

WinWaitActive("INDIVIDUAL PERSON-FIT")

ControlFocus("INDIVIDUAL PERSON-FIT", "", "ThunderRT6CommandButton6")

ControlSend("INDIVIDUAL PERSON-FIT", "", "ThunderRT6CommandButton6", "!d")

WinWaitActive("DISPLAY SPECIFICATIONS")

ControlFocus("DISPLAY SPECIFICATIONS", "", "ThunderRT6CommandButton4")

ControlSend("DISPLAY SPECIFICATIONS", "", "ThunderRT6CommandButton4", "!m")

WinWaitActive("Quit Project")

ControlFocus("Quit Project", "", "Button1")

ControlSend("Quit Project", "", "Button1", "{Enter}")

WinWaitActive("RUMM2020 - Current Projec")

ControlFocus("RUMM2020 - Current Projec", "", "ThunderRT6CommandButton10")

ControlSend("RUMM2020 - Current Projec", "", "ThunderRT6CommandButton10", "!c")

WinWaitActive("Closing the Project:")

ControlFocus("Closing the Project:", "", "Button1")

ControlSend("Closing the Project:", "", "Button1", "!y")

Link to comment
Share on other sites

  • Moderators

What operating system?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Are you sure that RUMM2020.EXE is tied to the window you want to go to? Have you checked the PIDs of the window and compared?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Hi gys

I have created a script that helps me do an anlysis using a software. And it works when I use Sleep() command but when I cnage it it with ProccesWait () command it actualy jumps back to window that assk about creating large file which is copule of lines up in the script file and pauses there. Then when I manulay click buttons it finishes the rest of the scrip fine. Any idea about what is going on here. Here

CODE
;SELECT PI-STDREZIDUA MATRIX

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1")

ControlCommand("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1", "ShowDropDown", "")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1", "{DOWN 4}")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1", "{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

;Save text file withouth footer and extreme persons

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton2")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton2", "!a")

;ProcessWait("RUMM2020.EXE")

WinWaitActive("Creating Large File")

ControlFocus("Creating Large File", "", "Button1")

ControlSend("Creating Large File", "", "Button1", "{ENTER}")

WinWaitActive("Output Specifications for Footer")

ControlFocus("Output Specifications for Footer", "", "Button2")

ControlSend("Output Specifications for Footer", "", "Button2", "!n")

WinWaitActive("Output Specifications for Extreme Persons")

ControlFocus("Output Specifications for Extreme Persons", "", "Button2")

ControlSend("Output Specifications for Extreme Persons", "", "Button2", "!n")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

;PAUSE SCRIPT UNTIL PIMATRIX FILE IS WRITEN. TIME IS IN MILISECONDS

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

;Sleep (60000)

ProcessWait("RUMM2020.EXE")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

;CLOSING THE PROJECT

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

WinWaitActive("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton3")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton3", "{Enter}")

WinWaitActive("INDIVIDUAL PERSON-FIT")

ControlFocus("INDIVIDUAL PERSON-FIT", "", "ThunderRT6CommandButton6")

ControlSend("INDIVIDUAL PERSON-FIT", "", "ThunderRT6CommandButton6", "!d")

WinWaitActive("DISPLAY SPECIFICATIONS")

ControlFocus("DISPLAY SPECIFICATIONS", "", "ThunderRT6CommandButton4")

ControlSend("DISPLAY SPECIFICATIONS", "", "ThunderRT6CommandButton4", "!m")

WinWaitActive("Quit Project")

ControlFocus("Quit Project", "", "Button1")

ControlSend("Quit Project", "", "Button1", "{Enter}")

WinWaitActive("RUMM2020 - Current Projec")

ControlFocus("RUMM2020 - Current Projec", "", "ThunderRT6CommandButton10")

ControlSend("RUMM2020 - Current Projec", "", "ThunderRT6CommandButton10", "!c")

WinWaitActive("Closing the Project:")

ControlFocus("Closing the Project:", "", "Button1")

ControlSend("Closing the Project:", "", "Button1", "!y")

At what point in the script is the process "RUMM2020.EXE" started?

EndFuncAutoIt is the shiznit. I love it.
Link to comment
Share on other sites

At what point in the script is the process "RUMM2020.EXE" started?

It is at the very begging of the script I di not want to post the whole scrip because it is to long but now I will. Also I am trying to find how to check window PID at the moment any suggestion will be appreciated
CODE
; This is the script that obtin PI_Matricies using RUMM2020

;The end resutl is series of text files.

;NOTE that before inporting filess in SPS aheader in the text file had to deleted

Run ("C:\Program Files\RUMM2020\RUMM2020.EXE")

;START OF THE LOOP

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~

$answer = 6

While $answer = 6

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~

WinWaitActive("RUMM2020")

ControlFocus("RUMM2020", "", "ThunderRT6CommandButton12")

ControlSend("RUMM2020", "", "ThunderRT6CommandButton12", "{Enter}")

WinWaitActive("Project Name")

Send("!a")

WinWaitActive("Reviewing Records in Raw Data File")

Send("!d")

WinWaitActive("Data Design")

ControlFocus("Data Design", "", "ThunderRT6CommandButton3")

ControlSend("Data Design", "", "ThunderRT6CommandButton3", "!d")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;IMPORT PERSON TEMPLATE

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("Data Format: Specifying Unique Identifier")

Send("!i")

WinWaitActive("Specifying Person ID")

Send("!p")

WinWaitActive("Save Item Format Template")

Send("!n")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;IMPORT ITEM SPEC TEMPLATE

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("Item Specifications")

Send("!i")

WinWaitActive("Item Specifications")

Send("!d")

WinWaitActive("Save Item Specification Template")

ControlFocus("Save Item Specification Template", "", "Button2")

ControlSend("Save Item Specification Template", "", "Button2","!n")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;SETING RUMM TO RUNN POLYTOMOUS ITEMS ANALYSIS

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("Creating FIRST Analysis Name")

ControlFocus("Creating FIRST Analysis Name", "", "ThunderRT6OptionButton7")

ControlCommand("Creating FIRST Analysis Name", "", "ThunderRT6OptionButton7", "Check", "")

ControlFocus("Creating FIRST Analysis Name", "", "ThunderRT6CommandButton3")

ControlSend("Creating FIRST Analysis Name", "", "ThunderRT6CommandButton3","{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;Edit system to exclude zero frequency categories

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("Analysis Name")

ControlFocus("Analysis Name", "", "ThunderRT6OptionButton21")

ControlCommand("Analysis Name", "", "ThunderRT6OptionButton21", "Check", "")

ControlFocus("Analysis Name", "", "ThunderRT6CommandButton3")

ControlSend("Analysis Name", "", "ThunderRT6CommandButton3", "{Enter}")

ControlFocus("MODEL SPECIFICATIONS", "", "ThunderRT6CheckBox1")

ControlCommand("MODEL SPECIFICATIONS", "", "ThunderRT6CheckBox1", "Check", "")

WinWaitActive("Convergence Criterion Setting")

Send("!y")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;CHANGE NUMBER OF IN AND OUT ITTERATION TO 900 TIMES

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

ControlFocus("MODEL SPECIFICATIONS", "", "ThunderRT6TextBox3")

ControlSend("MODEL SPECIFICATIONS", "", "ThunderRT6TextBox3", "900")

ControlFocus("MODEL SPECIFICATIONS", "", "ThunderRT6TextBox4")

ControlSend("MODEL SPECIFICATIONS", "", "ThunderRT6TextBox4", "900")

ControlFocus("MODEL SPECIFICATIONS", "", "ThunderRT6CommandButton3")

ControlSend("MODEL SPECIFICATIONS", "", "ThunderRT6CommandButton3", "!a")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;RUN RUMM

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;###################################################################################################

######

; FOLLWING TWO LINES APPLY ONLY TO ERROR MESSAGE ON GORAN'S COMPUTER (MARCH 2006)

ControlFocus("RUMM2020", "", "Button1")

ControlSend("RUMM2020", "", "Button1", "{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("Analysis Name")

ControlFocus("Analysis Name", "", "ThunderRT6CommandButton3")

ControlSend("Analysis Name", "", "ThunderRT6CommandButton3", "{Enter}")

ControlFocus(" Person Estimation", "", "ThunderRT6CommandButton3")

ControlSend(" Person Estimation", "", "ThunderRT6CommandButton3", "{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;DISPLAY INFORMATION WIGHTHED MAXIMUM LIKLIHOOD ESTIMATE

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("Analysis Name", "Display Analysis")

ControlFocus("Analysis Name", "Display Analysis", "ThunderRT6CommandButton3")

ControlSend("Analysis Name", "Display Analysis", "ThunderRT6CommandButton3", "{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;CHECK THE ITEM-PERSON BUTTON

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("DISPLAY SPECIFICATIONS")

ControlFocus("DISPLAY SPECIFICATIONS", "", "ThunderRT6OptionButton27")

ControlCommand("DISPLAY SPECIFICATIONS", "", "ThunderRT6OptionButton27", "Check", "")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;PRESS DISPLAY PERSON BUTTON

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

ControlFocus("DISPLAY SPECIFICATIONS", "", "ThunderRT6CommandButton5")

ControlSend("DISPLAY SPECIFICATIONS", "", "ThunderRT6CommandButton5", "{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;SENDS MOUSE CLICK IN ORDER TO DISPLAY INITIAL ITEM-PERSON DATA

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("INDIVIDUAL PERSON-FIT")

ControlFocus("INDIVIDUAL PERSON-FIT", "", "MSFlexGridWndClass2")

ControlClick("INDIVIDUAL PERSON-FIT", "", "MSFlexGridWndClass2")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;PRESS PERSON-ITEM BUTTON

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

ControlFocus("INDIVIDUAL PERSON-FIT", "", "ThunderRT6CommandButton3")

ControlSend("INDIVIDUAL PERSON-FIT", "", "ThunderRT6CommandButton3", "!i")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;SELECT OPTION TO SORT ITEMS BY SERIAL ORDER

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox2")

ControlCommand("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox2", "ShowDropDown", "")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox2")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox2", "{LEFT}")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox2")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox2", "{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;SELECT TAB DELIMITED FILE

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6OptionButton1")

ControlCommand("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6OptionButton1", "Check", "")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;SELECT PI-STDREZIDUA MATRIX

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1")

ControlCommand("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1", "ShowDropDown", "")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1", "{DOWN 4}")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1", "{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;Save text file withouth footer infor and extreme persons

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton2")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton2", "!a")

ControlFocus("Creating Large File", "", "Button1")

ControlSend("Creating Large File", "", "Button1", "{ENTER}")

ControlFocus("Output Specifications for Footer", "", "Button2")

ControlSend("Output Specifications for Footer", "", "Button2", "!n")

WinWaitActive("Output Specifications for Extreme Persons")

ControlFocus("Output Specifications for Extreme Persons", "", "Button2")

ControlSend("Output Specifications for Extreme Persons", "", "Button2", "!n")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;PAUSE SCRIPT UNTIL PIMATRIX FILE IS WRITEN. TIME IS IN MILISECONDS

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~

;Sleep (45000)

ProcessWait("RUMM2020.EXE")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;CLOSING THE PROJECT

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~

WinWaitActive("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton3")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton3", "{Enter}")

WinWaitActive("INDIVIDUAL PERSON-FIT")

ControlFocus("INDIVIDUAL PERSON-FIT", "", "ThunderRT6CommandButton6")

ControlSend("INDIVIDUAL PERSON-FIT", "", "ThunderRT6CommandButton6", "!d")

WinWaitActive("DISPLAY SPECIFICATIONS")

ControlFocus("DISPLAY SPECIFICATIONS", "", "ThunderRT6CommandButton4")

ControlSend("DISPLAY SPECIFICATIONS", "", "ThunderRT6CommandButton4", "!m")

WinWaitActive("Quit Project")

ControlFocus("Quit Project", "", "Button1")

ControlSend("Quit Project", "", "Button1", "{Enter}")

WinWaitActive("RUMM2020 - Current Projec")

ControlFocus("RUMM2020 - Current Projec", "", "ThunderRT6CommandButton10")

ControlSend("RUMM2020 - Current Projec", "", "ThunderRT6CommandButton10", "!c")

WinWaitActive("Closing the Project:")

ControlFocus("Closing the Project:", "", "Button1")

ControlSend("Closing the Project:", "", "Button1", "!y")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~

; END OF THE LOOP

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~

$answer = MsgBox(4, "", "Press YES to run NEW analysis or NO to exit RUMM", )

WEnd

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~

; EXIT RUMM

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~

WinWaitActive("RUMM2020")

ControlFocus("RUMM2020", "", "ThunderRT6CommandButton10")

ControlSend("RUMM2020", "Exit", "ThunderRT6CommandButton10", "!e")

WinWaitActive("Thank you for using RUMM2020")

ControlFocus("Thank you for using RUMM2020", "", "Button1")

ControlSend("Thank you for using RUMM2020", "", "Button1", "!y")

Edited by Zolaki
Link to comment
Share on other sites

It is at the very begging of the script I di not want to post the whole scrip because it is to long but now I will. Also I am trying to find how to check window PID at the moment any suggestion will be appreciated

CODE
; This is the script that obtin PI_Matricies using RUMM2020

;The end resutl is series of text files.

;NOTE that before inporting filess in SPS aheader in the text file had to deleted

Run ("C:\Program Files\RUMM2020\RUMM2020.EXE")

;START OF THE LOOP

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~

$answer = 6

While $answer = 6

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~

WinWaitActive("RUMM2020")

ControlFocus("RUMM2020", "", "ThunderRT6CommandButton12")

ControlSend("RUMM2020", "", "ThunderRT6CommandButton12", "{Enter}")

WinWaitActive("Project Name")

Send("!a")

WinWaitActive("Reviewing Records in Raw Data File")

Send("!d")

WinWaitActive("Data Design")

ControlFocus("Data Design", "", "ThunderRT6CommandButton3")

ControlSend("Data Design", "", "ThunderRT6CommandButton3", "!d")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;IMPORT PERSON TEMPLATE

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("Data Format: Specifying Unique Identifier")

Send("!i")

WinWaitActive("Specifying Person ID")

Send("!p")

WinWaitActive("Save Item Format Template")

Send("!n")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;IMPORT ITEM SPEC TEMPLATE

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("Item Specifications")

Send("!i")

WinWaitActive("Item Specifications")

Send("!d")

WinWaitActive("Save Item Specification Template")

ControlFocus("Save Item Specification Template", "", "Button2")

ControlSend("Save Item Specification Template", "", "Button2","!n")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;SETING RUMM TO RUNN POLYTOMOUS ITEMS ANALYSIS

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("Creating FIRST Analysis Name")

ControlFocus("Creating FIRST Analysis Name", "", "ThunderRT6OptionButton7")

ControlCommand("Creating FIRST Analysis Name", "", "ThunderRT6OptionButton7", "Check", "")

ControlFocus("Creating FIRST Analysis Name", "", "ThunderRT6CommandButton3")

ControlSend("Creating FIRST Analysis Name", "", "ThunderRT6CommandButton3","{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;Edit system to exclude zero frequency categories

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("Analysis Name")

ControlFocus("Analysis Name", "", "ThunderRT6OptionButton21")

ControlCommand("Analysis Name", "", "ThunderRT6OptionButton21", "Check", "")

ControlFocus("Analysis Name", "", "ThunderRT6CommandButton3")

ControlSend("Analysis Name", "", "ThunderRT6CommandButton3", "{Enter}")

ControlFocus("MODEL SPECIFICATIONS", "", "ThunderRT6CheckBox1")

ControlCommand("MODEL SPECIFICATIONS", "", "ThunderRT6CheckBox1", "Check", "")

WinWaitActive("Convergence Criterion Setting")

Send("!y")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;CHANGE NUMBER OF IN AND OUT ITTERATION TO 900 TIMES

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

ControlFocus("MODEL SPECIFICATIONS", "", "ThunderRT6TextBox3")

ControlSend("MODEL SPECIFICATIONS", "", "ThunderRT6TextBox3", "900")

ControlFocus("MODEL SPECIFICATIONS", "", "ThunderRT6TextBox4")

ControlSend("MODEL SPECIFICATIONS", "", "ThunderRT6TextBox4", "900")

ControlFocus("MODEL SPECIFICATIONS", "", "ThunderRT6CommandButton3")

ControlSend("MODEL SPECIFICATIONS", "", "ThunderRT6CommandButton3", "!a")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;RUN RUMM

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;###################################################################################################

######

; FOLLWING TWO LINES APPLY ONLY TO ERROR MESSAGE ON GORAN'S COMPUTER (MARCH 2006)

ControlFocus("RUMM2020", "", "Button1")

ControlSend("RUMM2020", "", "Button1", "{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("Analysis Name")

ControlFocus("Analysis Name", "", "ThunderRT6CommandButton3")

ControlSend("Analysis Name", "", "ThunderRT6CommandButton3", "{Enter}")

ControlFocus(" Person Estimation", "", "ThunderRT6CommandButton3")

ControlSend(" Person Estimation", "", "ThunderRT6CommandButton3", "{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;DISPLAY INFORMATION WIGHTHED MAXIMUM LIKLIHOOD ESTIMATE

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("Analysis Name", "Display Analysis")

ControlFocus("Analysis Name", "Display Analysis", "ThunderRT6CommandButton3")

ControlSend("Analysis Name", "Display Analysis", "ThunderRT6CommandButton3", "{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;CHECK THE ITEM-PERSON BUTTON

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("DISPLAY SPECIFICATIONS")

ControlFocus("DISPLAY SPECIFICATIONS", "", "ThunderRT6OptionButton27")

ControlCommand("DISPLAY SPECIFICATIONS", "", "ThunderRT6OptionButton27", "Check", "")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;PRESS DISPLAY PERSON BUTTON

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

ControlFocus("DISPLAY SPECIFICATIONS", "", "ThunderRT6CommandButton5")

ControlSend("DISPLAY SPECIFICATIONS", "", "ThunderRT6CommandButton5", "{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;SENDS MOUSE CLICK IN ORDER TO DISPLAY INITIAL ITEM-PERSON DATA

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("INDIVIDUAL PERSON-FIT")

ControlFocus("INDIVIDUAL PERSON-FIT", "", "MSFlexGridWndClass2")

ControlClick("INDIVIDUAL PERSON-FIT", "", "MSFlexGridWndClass2")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;PRESS PERSON-ITEM BUTTON

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

ControlFocus("INDIVIDUAL PERSON-FIT", "", "ThunderRT6CommandButton3")

ControlSend("INDIVIDUAL PERSON-FIT", "", "ThunderRT6CommandButton3", "!i")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;SELECT OPTION TO SORT ITEMS BY SERIAL ORDER

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

WinWaitActive("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox2")

ControlCommand("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox2", "ShowDropDown", "")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox2")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox2", "{LEFT}")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox2")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox2", "{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;SELECT TAB DELIMITED FILE

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6OptionButton1")

ControlCommand("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6OptionButton1", "Check", "")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;SELECT PI-STDREZIDUA MATRIX

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1")

ControlCommand("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1", "ShowDropDown", "")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1", "{DOWN 4}")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6ComboBox1", "{Enter}")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;Save text file withouth footer infor and extreme persons

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton2")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton2", "!a")

ControlFocus("Creating Large File", "", "Button1")

ControlSend("Creating Large File", "", "Button1", "{ENTER}")

ControlFocus("Output Specifications for Footer", "", "Button2")

ControlSend("Output Specifications for Footer", "", "Button2", "!n")

WinWaitActive("Output Specifications for Extreme Persons")

ControlFocus("Output Specifications for Extreme Persons", "", "Button2")

ControlSend("Output Specifications for Extreme Persons", "", "Button2", "!n")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;PAUSE SCRIPT UNTIL PIMATRIX FILE IS WRITEN. TIME IS IN MILISECONDS

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~

;Sleep (45000)

ProcessWait("RUMM2020.EXE")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~

;CLOSING THE PROJECT

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~

WinWaitActive("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS")

ControlFocus("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton3")

ControlSend("INDIVIDUAL PERSON-ITEM TEST-OF-FIT STATISTICS", "", "ThunderRT6CommandButton3", "{Enter}")

WinWaitActive("INDIVIDUAL PERSON-FIT")

ControlFocus("INDIVIDUAL PERSON-FIT", "", "ThunderRT6CommandButton6")

ControlSend("INDIVIDUAL PERSON-FIT", "", "ThunderRT6CommandButton6", "!d")

WinWaitActive("DISPLAY SPECIFICATIONS")

ControlFocus("DISPLAY SPECIFICATIONS", "", "ThunderRT6CommandButton4")

ControlSend("DISPLAY SPECIFICATIONS", "", "ThunderRT6CommandButton4", "!m")

WinWaitActive("Quit Project")

ControlFocus("Quit Project", "", "Button1")

ControlSend("Quit Project", "", "Button1", "{Enter}")

WinWaitActive("RUMM2020 - Current Projec")

ControlFocus("RUMM2020 - Current Projec", "", "ThunderRT6CommandButton10")

ControlSend("RUMM2020 - Current Projec", "", "ThunderRT6CommandButton10", "!c")

WinWaitActive("Closing the Project:")

ControlFocus("Closing the Project:", "", "Button1")

ControlSend("Closing the Project:", "", "Button1", "!y")

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~

; END OF THE LOOP

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~

$answer = MsgBox(4, "", "Press YES to run NEW analysis or NO to exit RUMM", )

WEnd

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~

; EXIT RUMM

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~

WinWaitActive("RUMM2020")

ControlFocus("RUMM2020", "", "ThunderRT6CommandButton10")

ControlSend("RUMM2020", "Exit", "ThunderRT6CommandButton10", "!e")

WinWaitActive("Thank you for using RUMM2020")

ControlFocus("Thank you for using RUMM2020", "", "Button1")

ControlSend("Thank you for using RUMM2020", "", "Button1", "!y")

Edit:

Typo

If you are wanting the script to pause until the "RUMM2020.exe" does not exist then you should use ProcessWaitClose because if you started the process at the beginning of the script then it's already running. ProcessWait tells the script to pause until that process exists which it already does.

Edited by EndFunc
EndFuncAutoIt is the shiznit. I love it.
Link to comment
Share on other sites

Edit:

Typo

If you are wanting the script to pause until the "RUMM2020.exe" does not exist then you should use ProcessWaitClose because if you started the process at the beginning of the script then it's already running. ProcessWait tells the script to pause until that process exists which it already does.

Thanks for the reply but the ProcesWaitClse is not going to work because I just want to pause script while RUMM is writing text file and than continue interacting with RUMM once is that process is finished. The Sleep function is doing the trick but I have unnecessary waiting time with that command.
Link to comment
Share on other sites

Thanks for the reply but the ProcesWaitClse is not going to work because I just want to pause script while RUMM is writing text file and than continue interacting with RUMM once is that process is finished. The Sleep function is doing the trick but I have unnecessary waiting time with that command.

This question interests me as i have allways used the sleep as well. but on some older systems they take longer to do something so you end up having to sleep for the maximum time to allow older systems time.

eg

send("abcdefghijklmnopqrstuvwxyz.. blah blah blah....")

sleep(10000)

Link to comment
Share on other sites

Problem solved using FileGetSize function to decide if text file has been written. That is loop stops when size of the file stops changing

CODE
Do

$size1= FileGetSize("file1.txt")

Sleep (3000)

$size2= FileGetSize("file1.txt")

Until $size2 - $size1 = 0

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