AI generated Macro Code??

Hey everyone,

I am not a macro coder at all.

I saw some examples of AI generated Python code that people have been posting YouTube videos about. They are very worried that the AI has the ability to generate code based on simple text input explaining what they want to code to do.

So, I was curious if it could write a CorelDraw X4 macro

Here's the prompt I used

Write a coreldraw x4 macro that will alternate between uppercase and lowercase of the selected text

Here's the code that it created based on that prompt

Sub AlternatingCase
  Dim objText As TextRange
  Set objText = ActiveSelection.TextRange
  Dim i As Long
  For i = 1 To objText.Length
    If objText.Chars(i).Case = cdrCaseLower Then
      objText.Chars(i).Case = cdrCaseUpper
    Else
      objText.Chars(i).Case = cdrCaseLower
    End If
  Next
End Sub
I was curious to hear from the master coders here what you think of this AI generated code?
Parents
No Data
Reply
  • that I have broken! It's a very good technology, still in training, but soon it will write some really cool stuff!, It already does a lot of good stuff,
    but still with errors that need to be corrected later in VBA! I recommend it for studies and to help as a virtual assistant. On our Channel I've been using it a lot to make texts and tags for the videos and of course, it needs a careful review and good commands, as accurate as possible! srsr Success there, I hope it helps you!

Children
No Data