Dennis Posted February 28 Report Share Posted February 28 It's pretty interesting. Here is what I tried: Please write code for Macro Express Pro 6 that watches a file folder for new files and then copies those files to another folder. That yielded: <--- Macro Express Pro 6 Script ---> <--- Start Macro ---> Variable Set Integer %WaitTime% to 5 Variable Set Integer %FileCount% to 0 Folder Watch Start "C:\FolderToWatch" Recurse Repeat Until %CancelMacro% Delay %WaitTime% Variable Set Integer %FileCount% to Folder Watch Count If %FileCount% > 0 Folder Watch Get Next "C:\FolderToWatch" "C:\FolderToCopy" End If End Repeat Folder Watch Stop <--- End Macro ---> Close, but no cigar, and I wanted the commands written for the Direct Editor. Using the first two lines, I provided an example in Direct Editor format, and got this back: Quote <VARIABLE SET INTEGER Option="\x00" Destination="%WaitTime%" Value="5"/> <VARIABLE SET INTEGER Option="\x00" Destination="%FileCount%" Value="0"/> <FOLDER WATCH START Folder="C:\FolderToWatch" Recurse="Yes"/> <REPEAT UNTIL Variable="%CancelMacro%" IgnoreCase="No"> <DELAY Flags="\x01" Time="%WaitTime%"/> <VARIABLE SET INTEGER Option="\x00" Destination="%FileCount%" Value="%FOLDER WATCH COUNT%"/> <IF VARIABLE="%FileCount%" Condition="Is Greater Than" Value="0" IgnoreCase="No"> <FOLDER WATCH GET NEXT SourceFolder="C:\FolderToWatch" DestinationFolder="C:\FolderToCopy"/> </IF> </REPEAT> <FOLDER WATCH STOP/> Still unworkable, but I was impressed. I continued providing feedback, pointing out to ChatGPT the commands that are not valid in Macro Express Pro 6, resulting in this: Quote <GROUP "Watch and Copy Files"> <COMMENT> Watches a folder for new files and copies them to another folder. </COMMENT> <VARIABLE SET STRING Option="\x00" Destination="%FolderToWatch%" Value="C:\FolderToWatch"/> <VARIABLE SET STRING Option="\x00" Destination="%FolderToCopy%" Value="C:\FolderToCopy"/> <CHANGE DIRECTORY/FOLDER Path="%FolderToWatch%"/> <LOOP> <DELAY Flags="\x01" Time="5"/> <IF FILE EXISTS="%FolderToWatch%\*.*"> <COPY FILE="%FolderToWatch%\*.*" TO="%FolderToCopy%\" Flags="\x00"/> <DELETE FILE="%FolderToWatch%\*.*"/> </IF> </LOOP> </GROUP> Most of the time ChatGPT would come back offering corrected code or defend its position. For example, when I questioned the <IF FILE EXIST...> line, here is how ChatGPT responded: The bottom line is that while ChatGPT did not yield ready-to-run Macro Express Pro code, it came pretty darn close. Actually, I never thought it would come that close at all. Turns out, it was far better than I expected. The give and take, and the rough translating into Macro Express Pro's direct editor format, surprised me. Upon each challenge, ChatGPT appeared to go back and verify the command and syntax. In some ways, it was like a little like discussing a snippet of code with programmer. If you have not yet checked out ChatGPT, I encourage you to do so. Here is the link: https://openai.com/blog/chatgpt I would be interested to learn what others think about how ChatGPT can be used with Macro Express Pro. --Dennis Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.