I asked this question and received 5 answers, one of which answered the question perfectly, which I accepted.
Later, It was downvoted and closed.
I don't want it reopened, but I want to know why a moderator would close and reduce my reputation given that the question:
gave information about my intention
contained script which was researched
was understood by other users
had an accepted answer