Skip to main content

Hello group,

 

Using :  Micro Focus REFLECTION Desktop Pro  v16.0  SP1  (build: 16.0.478.0)

   Relative newbie here and I have a question.   I would like to search for specific text on my current screen.  If the text is found, I would then like to highlight that text by invoking the "inverse" or "inverse blink" screen color that is found in my Display settings (Setup > Display > modify the currently selected theme file)?

  Has anyone done this before and if so, are you willing to share how to code for it?   I was hoping to have a EVENTS MAPPER running that would be looking for keywords.  This would then invoke a specific macro that would then search for the multiple text/keywords in question and the associated values that display along side this.  I would use a regular HOTSPOT , but the key element I am actually trying to highlight using the inverse color scheme is the changing value associated with the keyword.

Example:

Keyword         value

Bacteria          1

Bacteria          2

WBC               27

WBC               127

 

Thanks for any guidance or help in advance.


#Reflection
#inverseblink
#inverse
#DesktopforX

Hello group,

 

Using :  Micro Focus REFLECTION Desktop Pro  v16.0  SP1  (build: 16.0.478.0)

   Relative newbie here and I have a question.   I would like to search for specific text on my current screen.  If the text is found, I would then like to highlight that text by invoking the "inverse" or "inverse blink" screen color that is found in my Display settings (Setup > Display > modify the currently selected theme file)?

  Has anyone done this before and if so, are you willing to share how to code for it?   I was hoping to have a EVENTS MAPPER running that would be looking for keywords.  This would then invoke a specific macro that would then search for the multiple text/keywords in question and the associated values that display along side this.  I would use a regular HOTSPOT , but the key element I am actually trying to highlight using the inverse color scheme is the changing value associated with the keyword.

Example:

Keyword         value

Bacteria          1

Bacteria          2

WBC               27

WBC               127

 

Thanks for any guidance or help in advance.


#Reflection
#inverseblink
#inverse
#DesktopforX

Hello marshallgrads,

I don't have a definitive answer but wanted to bounce some ideas off of you.  I don't think there is going to be an easy way to change the attributes of the text as that is set by the host application and using modify themes would change the text for all words that have that same attribute (eg protected normal alpha.)  I think the hotspots might be the better route in this case.  You could create an event that searches for each of the keywords and launches a macro that you build for each of those keyword events.  In the macro build your logic that chooses what hotspot file you want to invoke based on the keyword.  You can build hotspot files that highlight the values you choose for each scenario.  I am not clear if you would want all of the values always highlighted based on the keyword.  If that is the case, you would only need one hotspot file per event.  You can then map an additional event to the the "hotspot" itself if needed.  That is, if you want something to happen when they click on the now highlighted text.  The "How Tos" section of the VBA documentation has some examples that might be helpful to you as well .

Additionally, I recommend updating your software to the current version as well.  That service pack version you are running is from October of 2017.  As you can imagine, there have been many updates and fixes to the product since then.

Regards,

Jeff


Hello marshallgrads,

I don't have a definitive answer but wanted to bounce some ideas off of you.  I don't think there is going to be an easy way to change the attributes of the text as that is set by the host application and using modify themes would change the text for all words that have that same attribute (eg protected normal alpha.)  I think the hotspots might be the better route in this case.  You could create an event that searches for each of the keywords and launches a macro that you build for each of those keyword events.  In the macro build your logic that chooses what hotspot file you want to invoke based on the keyword.  You can build hotspot files that highlight the values you choose for each scenario.  I am not clear if you would want all of the values always highlighted based on the keyword.  If that is the case, you would only need one hotspot file per event.  You can then map an additional event to the the "hotspot" itself if needed.  That is, if you want something to happen when they click on the now highlighted text.  The "How Tos" section of the VBA documentation has some examples that might be helpful to you as well .

Additionally, I recommend updating your software to the current version as well.  That service pack version you are running is from October of 2017.  As you can imagine, there have been many updates and fixes to the product since then.

Regards,

Jeff

Hi Jeff,

   Thanks for tagging onto my question.   After reading, I gave it a little thought and wondered if I could simply search for text on the screen that matches the keywords I am looking for.   I would then do the following:

  • Scrape that line of data from column 1-80
  • split the data on that line according to a structure of some sort
  • extract the segment from the split string, pulling out the Keyword and the matching numerical or other result
  • place these in some sort of a message box or listbox ??  Not sure the best way to do this?  Would it be better to create a simple FORM ?

 

since I am new at this I don't have all the experience with search form keyword and/or text on a screen..   Is there one way that is preferred.   I think they call them METHODS ( like - SearchText, GetText, ReadLine)??

 

Thanks again for any advice or suggestions.

Butch


Hi Jeff,

   Thanks for tagging onto my question.   After reading, I gave it a little thought and wondered if I could simply search for text on the screen that matches the keywords I am looking for.   I would then do the following:

  • Scrape that line of data from column 1-80
  • split the data on that line according to a structure of some sort
  • extract the segment from the split string, pulling out the Keyword and the matching numerical or other result
  • place these in some sort of a message box or listbox ??  Not sure the best way to do this?  Would it be better to create a simple FORM ?

 

since I am new at this I don't have all the experience with search form keyword and/or text on a screen..   Is there one way that is preferred.   I think they call them METHODS ( like - SearchText, GetText, ReadLine)??

 

Thanks again for any advice or suggestions.

Butch

Hi Butch,

It would be helpful to know what you want to do when the text is found.  The example you gave states that based on a keyword on the screen (which can be handled by an even.)  You would then search for an additional set of words to highlight (presumably with a macro using SearchText method that is kicked off by the event triggering.)  What is the purpose of highlighting these words?  Would there be an additional process that you would automate or is the highlighting strictly for the purpose of bringing the text to the user's attention?

Thanks,

Jeff

 


Hi Butch,

It would be helpful to know what you want to do when the text is found.  The example you gave states that based on a keyword on the screen (which can be handled by an even.)  You would then search for an additional set of words to highlight (presumably with a macro using SearchText method that is kicked off by the event triggering.)  What is the purpose of highlighting these words?  Would there be an additional process that you would automate or is the highlighting strictly for the purpose of bringing the text to the user's attention?

Thanks,

Jeff

 

In simplest of idea's just being able to generate a Message Box or Label would be sufficient.

 

Column #1                                                    Column #2                              Column #3

URINE NITRITE                                            NEGATIVE                              NEGATIVE
URINE LEUKOCYTE EST                         NEGATIVE                               NEGATIVE
APPEARANCE                                            CLEAR                                      CLEAR
SPECIFIC GRAVITY                                  1.001                                         1.006
URINE COLOR                                            COLORLESS                           YELLOW
URINE RBC (i)                                                                                                   23 H /HPF
URINE WBC (i)                                                                                                  4 H /HPF

 

In the above example, I would be wanting to search for the keywords of URINE NITRITE, URINE LEUKOCYTE EST, and URINE WBC (i).  Then I will be wishing to capture the entire line of text corresponding to that keywork.  Once the line of text is captured, I wish to then extract the results of the COLUMN #3 text and display it into a Message Box or Label ( I think a label might be simple enough?).

 

Thanks,

 

 


In simplest of idea's just being able to generate a Message Box or Label would be sufficient.

 

Column #1                                                    Column #2                              Column #3

URINE NITRITE                                            NEGATIVE                              NEGATIVE
URINE LEUKOCYTE EST                         NEGATIVE                               NEGATIVE
APPEARANCE                                            CLEAR                                      CLEAR
SPECIFIC GRAVITY                                  1.001                                         1.006
URINE COLOR                                            COLORLESS                           YELLOW
URINE RBC (i)                                                                                                   23 H /HPF
URINE WBC (i)                                                                                                  4 H /HPF

 

In the above example, I would be wanting to search for the keywords of URINE NITRITE, URINE LEUKOCYTE EST, and URINE WBC (i).  Then I will be wishing to capture the entire line of text corresponding to that keywork.  Once the line of text is captured, I wish to then extract the results of the COLUMN #3 text and display it into a Message Box or Label ( I think a label might be simple enough?).

 

Thanks,

 

 

Hi marshallgrads,

Is it always this simple or are you making it simple for an example? I am thinking you can have an event for each keyword and then a macro that each event calls that displays the message box.  After the first column of text is identified, how would you know you are capturing the right text for column 3?  Would it always be in the same place? 

Thanks,

Jeff B


Hi marshallgrads,

Is it always this simple or are you making it simple for an example? I am thinking you can have an event for each keyword and then a macro that each event calls that displays the message box.  After the first column of text is identified, how would you know you are capturing the right text for column 3?  Would it always be in the same place? 

Thanks,

Jeff B

Yes, the third column is always in the same column number.  I have been testing out a simple For/Next loop to scrape the screen and look for the text.  Then simply parsing the line of text to extract the column I am looking for.   


Yes, the third column is always in the same column number.  I have been testing out a simple For/Next loop to scrape the screen and look for the text.  Then simply parsing the line of text to extract the column I am looking for.   

marshallgrads,

I think you are on the right track.  You need to identify the event you want to trigger to capture the results from column 3.  Short of turning you over to our Professional Services group, I am hoping the community can help you get this project completed. Reflection Desktop VBA Guide

Thanks,

Jeff B