Programming and Scripting :: My first script



By the way, I believe if it were to output a proper 6-character html color, the format should be
Code Sample
color_selected = format("%.2X%.2X%.2X",r,g,b)

As it is now, an R, G, or B value of 0 is converted to a hex value of 0 instead of 00

Quote (crusadingknight @ July 19 2006,11:13)
For the first two, yes, those are the actions performed in the given segments (Though, you seem to have the format wrong for the second?).

So, I'll have a .lua file with the contents:

Code Sample
updateXserverrc(" 800x600x16")

xsri --color=#99,66,60


How do I call it?
Just click on it from emelFM?

No, to everything.

You didn't read my carefully-and-slowly-typed response, which explain at least the first two things I see wrong with your .lua file.

As far as how you call it....it depends on how the file was written and whether or not it's executeable.

You really should read a little bit about the process of scripting.
This applies to bash, but it's the same concept:
http://www.linuxcommand.org/wss0010.php

Quote (mikshaw @ July 20 2006,09:34)
No, to everything.

Sorry, too many answers from too many different people.  I'm getting confused as a result.

No offense intended.  Thanks for the URL.

no offense taken.  As usual, my response was lighthearted, although i probably should use more smilies.

I hope you find scripting to be a pleasure.  It is a constant learning experience and a joy to make something useful to yourself and others, although it can also be frustrating at times.  Fortunately the positive greatly outweighs the negative.

Next Page...
original here.