Good day,
I have just completed two important scripts, one for SAC and one for SAW.
The one for SAC is entitled: UpdateScenes
The one for SAW is entitled: UpdateBuiltInCmds
In each case, I have a text file with subsequent text that is to copied-and-then-pasted to various dialogs.
* One text file [P7Text] contains 22 items, the other text file [P8Text], 27 items.
* Employing a script ensures both accuracy and consistency throughout the entire process.
Also, in each case, there are both scripted commands and user commands
* User commands are those commands that would be manually implemented.
The copied-and-then-pasted commands are invoked via the implementation of the Numpad [minus] key/
* The script itself is invoked via a Menu option.
[A] Following is the UpdateScenes() script:
; -----------------------------------------------
Func UpdateScenes()
Local $hWnd = "[CLASS:SAC_SCENEPROPERTIES]"
; -----------------------------------------------
; Part A: [USER] Commands
; F Mixer Number Zone[s] is|are [manually] selected
; -----------------
; Part A: [SCRIPT] Commands
WinActivate("[CLASS:metapad]", "") ; P7Text is selected.
Send("{LSHIFT down}+{END}") ; The first line of P7Text is selected via [Shift UP] + [END].
Send("^x") ; The first line of P7Text is cut - LIFO is executed.
Send("{LSHIFT up}") ; [Shift UP] is disabled.
; -----------------------------------------------
; Part B [SCRIPT] Commands
WinActivate("[CLASS:SAC_SCENES]", "")
MouseClick($MOUSE_CLICK_LEFT, 254, 313, 1, 1) ; The Scenes View is selected, x y clicks speed
Sleep(100)
MouseClick($MOUSE_CLICK_LEFT, 133, 165, 1, 1) ; The first line of Scenes View is selected.
Sleep(100)
Send("{End}") ; The [End Of List] is selected via the [End] key.
MouseClick($MOUSE_CLICK_LEFT, 188, 118, 1, 1) ; The [New] button is selected.
Sleep(100)
Send("^v") ; The previously cut text is then pasted.
Send("{ENTER}") ; [Enter] is selected, for [Ok] - with the [Enter Scene Name...] dialog being summarily exited.
; -----------------------------------------------
; Part C: [SCRIPT] Commands
Sleep(100)
WinMove($hWnd, "", 960, 210) ; The Scene Properties window is displayed and is then moved to the right.
; -----------------
; Part D: [USER] Commands
; The Scene Properties are [manually] selected.
; [OK] is [manually] selected.
; The [Start] scene is [manually] selected.
EndFunc ;==>UpdateScenes
; -----------------------------------------------
Following is the UpdateBuiltInCmds() script:
; -----------------------------------------------
Func UpdateBuiltInCmds()
; Part A: [SCRIPT] Commands
WinActivate("[CLASS:metapad]", "") ; Activate text file.
Send("{LSHIFT down}+{END}") ; The first line of text is selected via [Shift UP] + [END].
Send("^x") ; Cut first line - LIFO is executed.
Send("{LSHIFT up}") ; Disable [Shift UP].
; -----------------------------------------------
; Part B: [SCRIPT] Commands
Sleep(250)
MouseClick($MOUSE_CLICK_LEFT, 161, 381, 2, 0) ; The Built-In Cmds Button is selected.
Send("{UP}") ; The [UP] arrow is selected to select the bottom line.
Sleep(250)
; [SCRIPT] Commands, Part B
Sleep(100)
MouseClick($MOUSE_CLICK_LEFT, 241, 776, 1, 0) ; SACLink Recall Scene By Name is selected.
Send("n") ; Select "n".
Send("^v") ; Past copied text.
; -----------------------------------------------
; Part C: [USER] Commands
; The following commands are [manually] invoked!
; -----------------------------------------------
; Coped text is updated|cut.
; Select [Enter].
; Select "P".
; Past cut text Q.
; Select [Enter].
; Select [Enter].
EndFunc ;==>UpdateBuiltInCmds
; -----------------------------------------------
If-and-when time permits, I may produce a video that shows precisely what is occurring during the execution of the [minus] key.
For those that my not know, scripts are absolutely excellent at performing repetitive tasks. And, as noted previously, employing scripts ensures both accuracy and consistency throughout an entire given process.
As always, I hope that the above information may be of some practicable use to others?
Thank you for your time!
OT: Scenes and Built-In Cmd Scripts
Moderator: Bob L