|
Mary,
Sure. You would need to know what the word is. I would set this up as a variable or pass the value as a string into a Sub or Function: Something like this:
sWord = "budget"
'Line1$ and Line2$ should contain the strings from the view commands at this point
If InStr(Line1$, sWord) And InStr(Line2$, sWord) Then 'String Found in both lines Else 'String not found in either line End If
Gabe Smith Merle West Medical Center Information Systems 2865 Daggett Street Klamath Falls, OR 97601
[EMAIL PROTECTED] Voice: 541-885-4617 Fax: 541-885-4679
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thompson, Mary
Gabe Thank you Would I be able to Search for a specific word in line 1 and then compare line 2 and see if it finds the same word in that line. Below is a simple example using just regular sentences. My code is just a bunch or words on a Meditech screen and I will tell it what to look for. Thank you! Mary - Word to find is budget Line 1: The hospital budget called for a 6% increase over three months. Line 2. The result of the 6% increase was a decrease in the budget deficit.
If line 2 has same word as line one then do following action, if not do this..
Mary Thompson Special Project Manager Children's Mercy Hospital (816) 234-3940
Electronic mail from Mary Thompson, The Children's Mercy Hospital. This communication is intended only for the use of the addressee. It may contain information which is privileged or confidential under applicable law. If you are not the intended recipient or the agent of the recipient, you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited. If you have received this communication in error, please immediately notify The Children's Mercy Hospital at 816-234-3940 or via return Internet electronic mail at [EMAIL PROTECTED] and expunge this communication without making any copies. Thank you for your cooperation.
-----Original Message-----
Mary,
I’m not sure what you are trying to do, but you can use variables the store the data in a string from a view command. Then you can use InStr to search a string from another string. Try something like this:
Line1$ = View(Row:=16, Col:=15, Length:=22) Line2$ = View(Row:=17, Col:=15, Length:=22)
‘Looks for any occurrence of Line2 in Line1 and reports the starting location of string If InStr(Line1$, Line2$) Then ‘Text Found Else ‘Text Not Found
Of course the row, column, and length should match what you are looking for on the screen. And don’t forget to Trim() your strings if you don’t want to look for leading and trailing spaces from the first line.
Hope this helps,
Gabe Smith Merle West Medical Center Information Systems 2865 Daggett Street Klamath Falls, OR 97601
[EMAIL PROTECTED] Voice: 541-885-4617 Fax: 541-885-4679
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thompson, Mary
I have word that I need to find in a line of code it could appear in multiple positions on this line but if it matches a word that is in a certain location on another line of code it is to perform certain functions. I have gotten the performance of the functions taken care of but how do I get my script to A. View and hold the value from one line then compare it to all the other text on another line looking for a match to determine what it will or will not do?? I can do a flat view = view or view <> view, but when the position changes and the name has to recognize first one and then compare to the other I am at a loss. I appreciate any thoughts! Thank you Mary
Mary Thompson Special Project Manager Children's Mercy Hospital (816) 234-3940
Electronic mail from Mary Thompson, The Children's Mercy Hospital. This communication is intended only for the use of the addressee. It may contain information which is privileged or confidential under applicable law. If you are not the intended recipient or the agent of the recipient, you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited. If you have received this communication in error, please immediately notify The Children's Mercy Hospital at 816-234-3940 or via return Internet electronic mail at [EMAIL PROTECTED] and expunge this communication without making any copies. Thank you for your cooperation.
|
- [Talk] Word Search Thompson, Mary
- RE: [Talk] Word Search Corinna
- RE: [Talk] Word Search Thompson, Mary
- RE: [Talk] Word Search Smith,Gabe
- RE: [Talk] Word Search Thompson, Mary
- RE: [Talk] Word Search Smith,Gabe
- RE: [Talk] Word Search Thompson, Mary
- RE: [Talk] Word Search Smith,Gabe
