Pinned topicHow to set the cursor position to a specific field in a Macro

‏2013-01-25T22:32:12Z
|Tags:

Answered question
This question has been answered.

Unanswered question
This question has not been answered yet.

Hi All,

I am recording a macro and would have to do the following.

1. I have to navigate to set the cursor to a particular field on the screen but that field can appear anywhere on the screen and is not constant. However the fields can be identified based on the text which does not change.

2. For some of the non-constant fields on the screen the selection happens before the "field text" while for others it happens after the "field text"
Example:s FieldOptionA (selection is before the Fieldtext)
FieldOptionB s (selection is after the Fieldtext)

Let me know your thoughts on how we could do it
Thanks in Advance,
Ravikanth Chavali

Re: How to set the cursor position to a specific field in a Macro

‏2013-01-28T19:03:15Z

This is the accepted answer.
This is the accepted answer.

Use the $HMLPSUtil$ library. Search the presentation space for the location of the "field text". Get the row and column position of the "field text" found. Calculate the location of the input field using macro variables.

Re: How to set the cursor position to a specific field in a Macro

Use the $HMLPSUtil$ library. Search the presentation space for the location of the "field text". Get the row and column position of the "field text" found. Calculate the location of the input field using macro variables.

Here is a sample piece of a macro that shows a search being done based on a string entered from a prompt and stored in a macro variable. Then the location where the string is found is used to determine the row where a value will be input. In this case the column is fixed since we already knew that location.

Just wanted to show a quick code sample to make it a little clearer how the HMLPSUtil is used in a macro.

Thanks
Tim

Here is a sample piece of a macro that shows a search being done based on a string entered from a prompt and stored in a macro variable. Then the location where the string is found is used to determine the row where a value will be input. In this case the column is fixed since we already knew that location.

Re: How to set the cursor position to a specific field in a Macro

‏2013-05-12T20:51:52Z

This is the accepted answer.
This is the accepted answer.

I tried to search for this question; I was searching based on the author as i could not recollect the tags i have given. This is a topic I started, and suprisingly it shows SystemAdmin as the author. I recoginzed it based on the signature on the original message. Just wanted to clarify if this is normal and expected behavior? and any insight as to why this would/will happen is appreciated?

It will be very helpful if we could find the questions that a user posted or replied, somewhere in their profile... Please let us know if there is an easy way to get to those questions.