Hello Everyone,
This is my first attempt to post to a forum, so I apologize if I miss anything.
I have a problem with a macro I'm trying to create in Attachmate Extra Sessions.
The macro is used to pass between different screens in the session, pull data strings, format those strings and finally it goes to another screen where it inputs those strings.
My new macro concept is set to do several things. First I pull about 25 different pieces of information from the screens.
For example, I pull a Date of service using...
DOS = sesso.screen.getstring (1,2,6)
DOS = Format(DOS, "mm/dd/yyyy")
The final input screen has up to 10 different fields that need filled out with any different combination of my current strings.
I decided to create template files in .dat format so that the user gets prompted with an inputbox and they type in a number, the macro checks the system folder to see if a file by that number exists and returns 10 variables that are in the .dat file which I pulled out using an array.
Example-
"Namefile= "S:\Dental Claims DeptAccess\Team Macros\Toolbar Files\DataTrack\" & LetterNum & ".dat"
Open Namefile for Input As #1
Input #1, Var(1), Var(2), Var(3), Var(4), Var(5), Var(6), Var(7), Var(8), Var(9), Var(10)
Close #1 "
Here's the problem,
If Var(1) = DOS in the .dat file, I want it to return the value of the string DOS, not the text "DOS".
The .dat file is formated in this manner
"DOS","MRD","3","4",etc...
If the Var() in the .dat file has a matching string in the macro I want it to return the strings defined value, if there is no match, I want it to return the actual text value("DOS"). Is there an easy way to do this? I don't really want to write a ton of "If...Then" statements. I'm fairly new to this and I can't figure this out. I appreciate any insight you may be able to provide me. Thanks again!
JT
This is my first attempt to post to a forum, so I apologize if I miss anything.
I have a problem with a macro I'm trying to create in Attachmate Extra Sessions.
The macro is used to pass between different screens in the session, pull data strings, format those strings and finally it goes to another screen where it inputs those strings.
My new macro concept is set to do several things. First I pull about 25 different pieces of information from the screens.
For example, I pull a Date of service using...
DOS = sesso.screen.getstring (1,2,6)
DOS = Format(DOS, "mm/dd/yyyy")
The final input screen has up to 10 different fields that need filled out with any different combination of my current strings.
I decided to create template files in .dat format so that the user gets prompted with an inputbox and they type in a number, the macro checks the system folder to see if a file by that number exists and returns 10 variables that are in the .dat file which I pulled out using an array.
Example-
"Namefile= "S:\Dental Claims DeptAccess\Team Macros\Toolbar Files\DataTrack\" & LetterNum & ".dat"
Open Namefile for Input As #1
Input #1, Var(1), Var(2), Var(3), Var(4), Var(5), Var(6), Var(7), Var(8), Var(9), Var(10)
Close #1 "
Here's the problem,
If Var(1) = DOS in the .dat file, I want it to return the value of the string DOS, not the text "DOS".
The .dat file is formated in this manner
"DOS","MRD","3","4",etc...
If the Var() in the .dat file has a matching string in the macro I want it to return the strings defined value, if there is no match, I want it to return the actual text value("DOS"). Is there an easy way to do this? I don't really want to write a ton of "If...Then" statements. I'm fairly new to this and I can't figure this out. I appreciate any insight you may be able to provide me. Thanks again!
JT