GDad7627 Posted June 10, 2016 Share Posted June 10, 2016 I am not a programmer but have a VBScript that I need to modify to fix the format of a number. I have two fields that are being captured and I need to combine them and pad one with zeros Input District = 01 Location = 13 0010 0020 0030 Output Location = 01 0013 0010 0020 0030 Here is the code I am working with. [PCOMM SCRIPT HEADER]LANGUAGE=VBSCRIPTDESCRIPTION=[PCOMM SCRIPT SOURCE]'This is the code to create IBM's automation COM object to'obtain data directly from the screen.Set autECLConnList = CreateObject("PCOMM.autECLConnList")Set autECLPSObj = CreateObject("PCOMM.autECLPS")autECLConnList.RefreshautECLPSObj.SetConnectionByHandle(autECLConnList(1).Handle)'Create the Books Connect object.Set proxy = CreateObject("SLWindowObject.Proxy.SLWindowProxy")'Create the configurations, setting both'application and window name. Window name'need not be the same as the actual application'data is being pulled from.proxy.SetApplicationName("AS400 Client Access")proxy.SetWindowName("Tax Collections and Tickets")'This checks to see what screen we are currently on and'changes the screen positioning accordingly.IF autECLPSObj.GetText(4, 35, 13) = "Screen Name" THENCall proxy.AddField("Year", autECLPSObj.GetText(5, 27, 4), True)Call proxy.AddField("Type Number", Trim(autECLPSObj.GetText(5, 32, 12)), True)Call proxy.AddField("Account Number", autECLPSObj.GetText(5, 56, 8), True)Call proxy.AddField("Payer", Trim(autECLPSObj.GetText(7, 8, 30)), True)Call proxy.AddField("District", autECLPSObj.GetText(6, 53, 2), True)Call proxy.AddField("Location", autECLPSObj.GetText(7, 56, 20), True)END IFproxy.UpdateInteractionproxy.LaunchRemote Any help would be great. GDad Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now