Newbies bmttoys Posted April 1, 2009 Newbies Posted April 1, 2009 (edited) 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, 2009 by Guest
Fitch Posted April 1, 2009 Posted April 1, 2009 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 []
Recommended Posts
This topic is 5716 days old. Please don't post here. Open a new topic instead.
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