English > Talk

AI and PVD

<< < (2/4) > >>

afrocuban:
Second one

afrocuban:
The third one

afrocuban:
The last version. I still can't decide which one to keep and maintain...

afrocuban:
Here's how I learned to talk to Copilot:



--- Quote ---Here's a guide on how to structure your requests to make them as clear as possible. I'll use your last request as an example:


Tips for Clear Requests:
* Be Specific: Clearly state what you want to achieve.
* Provide Context: Give background information if necessary.
* Use Clear Language: Avoid ambiguous terms.
* Break Down Complex Tasks: If your request has multiple parts, list them out.
* Include Examples: Show an example of what you're looking for if possible.Your Last Request:

Original Request: "I need a code snippet to populate a custom field 'IMDB Studio2' with a concatenation of 'STUDIO RELEASE BY' and the parsed value of the custom field 'IMDb Studio2' in the next line."


Example Interaction:

You: "I need help modifying a code snippet. The goal is to populate a custom field named 'IMDb Studio2' with a concatenation of the text 'STUDIO RELEASE BY' followed by a line break and the parsed value of the current 'IMDb Studio2' field. Here is the code snippet I'm working with:

pascal



--- Code: ---// Get Production Companies
curPos := Pos('<h4 class="ipl-header__content ipl-list-title">Production Companies</h4>', HTML);
If curPos > 0 Then Begin
    EndPos := curPos;
    ItemValue140 := HTMLValues(HTML, '<h4 class="ipl-header__content ipl-list-title">Production Companies</h4>', '</ul>', '<li>', '</li>', ', ', EndPos);
    ItemValue140 := StringReplace(ItemValue140, '                         ', '  ', True, False, True);
    if ItemValue140 <> '' then AddCustomFieldValueByName('Imdb Studio2', ItemValue140);             
    if ItemValue140 <> '' then LogMessage('Get results Production Companies:' + ItemValue140);
End;

--- End code ---

Could you help me modify this to achieve the desired result?"



My Response: "Sure! Here’s the modified code snippet that will populate the custom field 'IMDb Studio2' with 'STUDIO RELEASE BY' followed by a line break and the parsed value:

pascal

--- Code: ---
// Get Production Companies
curPos := Pos('<h4 class="ipl-header__content ipl-list-title">Production Companies</h4>', HTML);
If curPos > 0 Then Begin
    EndPos := curPos;
    ItemValue140 := HTMLValues(HTML, '<h4 class="ipl-header__content ipl-list-title">Production Companies</h4>', '</ul>', '<li>', '</li>', ', ', EndPos);
    ItemValue140 := StringReplace(ItemValue140, '                         ', '  ', True, False, True);


    // Custom field: IMDb Studio2 (formatted as "STUDIO RELEASE BY\n[ItemValue140]")
    If ItemValue140 <> '' Then Begin
        ItemValue140 := 'STUDIO RELEASE BY' + #13#10 + ItemValue140; // #13#10 represents a line break
        AddCustomFieldValueByName('IMDb Studio2', ItemValue140);
        LogMessage('IMDb Studio2 field added with value: ' + ItemValue140);
    End;
End;



--- End code ---

This code ensures the custom field 'IMDb Studio2' is populated correctly with the desired format. If you have any further adjustments or additional requirements, let me know!"

By structuring your request this way, it helps ensure I understand exactly what you need and can provide the most accurate assistance. If you have more examples or need further guidance, feel free to ask!

--- End quote ---



I think you can talk to it in your own language without a problem, too.

Ivek23:
Thanks for the extensive description of how AI can be helpful.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version