April 1, 200916 yr Newbies I want to merge these two scripts. The majority of the commands in both of them are the same. There are just a few that are different. How do I go about merging them? Does it matter in what order the commands go? Script 1: Go to Layout ["data entry"] Enter Find Mode [Pause] Perform Find [] Go to Layout ["employee job hour for week ending"] Enter Browse Mode [] Print Setup [Restore; No dialog] Sort Records [Restore; No dialog] Go to Record/Request/Page [First] Enter Preview Mode [Pause] Go to Layout ["data entry"] Enter Browse Mode [] Script 2: Go to Layout ["data entry"] Enter Find Mode [Pause] Perform Find [] Enter Browse Mode [] Print Setup [Restore; No dialog] Sort Records [Restore; No dialog] Go to Record/Request/Page [First] Go to Layout ["employee hours inception report"] Refresh Window [] Enter Preview Mode [Pause] Go to Layout ["data entry"] Enter Browse Mode [] Thanks in advance, Vanessa Edited April 1, 200916 yr by Guest
April 1, 200916 yr Yes the order of the commands matters, it's like giving someone driving directions, one step follows the other. There are exceptions, e.g. Print Setup can go almost anywhere. You'd merge the script by copying and pasting the relevant script steps. In this case it looks like that's just the Go to Layout step. That's assuming that you use the same Print Setup and Sort for both reports. If not, copy over those steps and put them inside the "If." Set Variable[ $param; Get( ScriptParameter ) ] Go to Layout ["data entry"] Enter Find Mode [Pause] Perform Find [] If[ $param = "week ending report" ] Go to Layout ["employee job hour for week ending"] Else Go to Layout ["employee hours inception report"] End If Print Setup [Restore; No dialog] Sort Records [Restore; No dialog] Enter Preview Mode [Pause] Go to Layout ["data entry"] Enter Browse Mode []
Create an account or sign in to comment