Posts: 6073 Reputation: 57
39 / /
Joined: Oct 2003
RE: [not really a release/help] my first script
quote:Originally posted by Chestah
Also it doesn't matter for your script but in programming in general its good to abstract components of your code so you can reuse them. For instance your readclipboard() function reads the data and puts it into the variable ISI. It would be better if instead it just returned the string contents of the clipboard and then in your code you would do something like this:
code: ISI = readClipboard();
You could do something similiar to the matchISI() function and pass in the ISI variable. It doesn't really have any impact on this script but its just a programming practise that you can use to reuse code .
Good work!
It matters in scripts too: it's programming after all. Personally, I'd recommend this as a matter of style: having global variables can be quite dangerous.