Calculate the size of the font, $window(@win).w and $window(@win).h etc, and calculate its position!
If you need help creating a 'better' preview, id be happy to help @ irc.deltaanime.net:6667 - #Lindrian :)
As you can see from this picture I've had my fair share when it comes to creating theme editors, and especially, previews ;). Thouugh I assume my preview does not work the same way yours does (as I belive my system is a bit more complex (MTS based)), it is still not very hard to do! :)
(11:01:37) (@Kol) $file().size tends to be innacurate
(11:01:41) (@Kol) Due to extra information stored with the file
(11:02:19) (@Kol) and $file().size counts trailing/leading spaces i believe
Those 2 extra bytes are the information stored in the file, besides what you wanted to save.
EL, this would be like trying to show a picture to someone over the phone, it's just so much easier showing them it. And if he did not want to communicate over IRC, it is his own loss and not mine. I offered my help, he declined, end of story.
EL: I would be more than happy to help, I have not earned my status on several sites because I am not willing to help. But people like Typo do piss me off. I tried inviting him for a mature conversation on a server im active on (not my own), so I could in depth explain everything, since it would be 100x easier.
I, myself, am 19 years old, soon 20.
And I rated this a 3 because:
1) Regex patterns are not correct
2) Coding is unefficient
3) The byte-counting is invalid.
In my opinion, a script like that is "Not useful" - 3.
I will not argue with stubborn kids, which is why im not going to explain myself. I think your entire code is rubbish; every aspect I look at it, somethng is wrong.You're one of those kids who think you're right even thought you're wrong, and will not accept the fact that you were wrong.
Also, I would add this.requestfocus(); to the init event.