ChatGPT -- any useful prompts for writing script code?

Anyone got any good prompts for ChatGPT when asking it to write Directory Opus script code?
Especially helpful would be anything that can make it better at writing GUI-related code -- I keep getting error after error when trying to do this.

I'll start with the only useful prompt I have:

Remember: Directory Opus uses JScript NOT Javascript.

ChatGPt knows a lot about Directory Opus and scripting here.
The code here:

is in 99% written by ChatGPT. In the query I just underlined to create script for Directory Opus using Vbscript.

After creating script ChatGPT also gave step by step instruction of how to assign the script to button :slight_smile:

1 Like

And here is example query to ChatGPT to create script:

I need a script for Directory Opus, which will do as following:

  1. for each folder in "F:", check the folder name pattern. If the pattern is x1#x2#x3#x4#x5 then go to point 3.
  2. If the folder name does not match to patrern, skip it.
  3. get the value of x1
  4. On disk Y: check if there is a folder which name is the same as previously taken from x1 (the matching shouldn't be case sensitive)
  5. If script will find a folder that corresponds to x1, as mentioned in point 4, go to point 7
  6. If it's impossible to match x1 value to any folder on drive y:, then skip such folder
  7. Copy the matching folder from "F:" to corresponding folder on drive Y:, leaving it's attributes (including Directory Opus labels) unchanged. Then if copying is succesful, delete this folder from "F:"
  8. Do all these points to all folders in "F:".
  9. Show me summary for all script's iteration. I want to see list of all folders that have been checked by script with statuses (if the pattern wasn't correct or there were no matching folder on drive Y:) or done (if folder was copied succesfuly to the corresponding folder on drive Y: and deleted from "F:")

I prefer vbscript

1 Like