|
<< Click to Display Table of Contents >> Manual > Screen Creation Guide > Advanced Editing Functions of Panel Editor > Script Search > Script search and replace operations |
Script search and replace operations
This article explains the replace operation in the script search function of Panel Editor.
Script search provides the ability to replace keywords specified as search criteria with any string of characters.
The replacement operation is performed in the following parts:
![]()
|
Enter the replacement string.
|
|
Replaces the line selected in the search list with the selected line. After the replacement, the selected line remains.
|
|
Undoes the replacement effect on the selected line in the search list. The selected line remains after the operation.
|
|
Replace all lines displayed in the search list at once.
|
|
This will undo all the replacement results displayed in the search list at once.
|
|
Replaces the line selected in the search list with only one line, then moves to the next line. This operation is useful when you want to check the lines to be replaced one by one.
|
|
Undoes the replacement of the line selected in the search list and moves to the previous line.
|
|
Moves to the next line from the currently selected line in the search list. No replacement is performed.
|
|
Moves from the currently selected line in the search list to the previous line. No replacement is performed.
|
You can also select whether or not to include a line in the replacement by checking the following columns in the search list. Clicking the check mark with the mouse will switch the check between ON/OFF, and unchecking it will exclude it from the replacement process. For example, if the line is unchecked, even if you perform the operation "Replace only one line and move to the next line", the replacement process will not be performed and you will move to the next line.

The following explains how to perform the replace operation.
1.Run a script search.
As an example, here we have entered "vIsEnabled" as the search criteria.
The search results are displayed in a list. If you look at the text in the list, you can see that it contains the search criterion "vIsEnabled".

2.Replace only one line
To replace only one line, first enter the replacement string in the following section. In this example, "vFlag" is entered.
and,Select the line you want to replace in the search list., click the Replace One Line action icon.

Then, the keyword "vIsEnabled" in the target line was replaced with "vFlag". In this way, only the part that exactly matches the keyword string specified in the search condition is replaced with the replacement string.
Lines where replacement has been made will have an "○" displayed in front of the Text column, allowing you to see which lines have been replaced.

3.Global Replace
To perform a bulk replacement, first enter the replacement string in the following area. In this example, "vFlag" is entered.
and,With any row selected in the search list,Click the Bulk Replace action icon.

The keyword (in this example, "vIsEnabled") in all rows displayed in the search list will then be replaced with the specified replacement string (in this example, "vFlag").
An "○" will be displayed in front of the Text column of all lines where replacement has been performed, allowing you to confirm that all lines have been replaced.

4.Cancel (undo) a replacement
To cancel the replacement (revert to the state before replacement), you can undo it by performing the following operations.

This will cancel the replacement process and revert it to its original state.
Please make sure that the "○" in front of the Text column disappears and the Text content is restored to normal.

|
You can cancel (undo) a replacement operation only until the script search has performed a search for a different keyword (i.e., while the replaced item is displayed in the search result list). |