mIRC Home    About    Download    Register    News    Help

Print Thread
#88505 28/06/04 07:27 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
i have on the start of script (when you run mirc)
echo of the name of script echoed with TAB (placed) on the center of the screen in status window, but it is centered only on 800x600 resolution :P

is there a way to do it somehow (some script or some code) to be centered under any resolution ?

#88506 28/06/04 07:51 PM
Joined: Dec 2002
Posts: 397
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
what are u useing too create this?.... if u r useing a window do something like

Code:
var %screen.h = $calc($window(-1).h / 2)
var %screen.w = $calc($window(-1).w / 2)


im sure u can figur out what too do from here but there that should give u the center of the screen ;p


Need amazing web design for low price: http://www.matrixn3t.net
#88507 28/06/04 07:54 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
itz ordinary /echo just with many spaces like

/echo                                                       Scriptname

btw, tnx for help but i dont know how will it help smirk (me sux)

Last edited by bunar; 28/06/04 07:55 PM.
#88508 28/06/04 08:30 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
echo -s $str($+($chr(32), ), $calc(($window(Status Window).w - $width([color:red]Your text, $window(Status Window).font, $window(Status Window).fontsize)) / 2 / $width($chr(32), $window(Status Window).font, $window(Status Window).fontsize))) $+ Your text[/color]

That would centre Your text on the active window based on it's current width, however there's no way to make it stay centred if the window is resized unless it's a custom window.

Last edited by starbucks_mafia; 28/06/04 08:31 PM.

Spelling mistakes, grammatical errors, and stupid comments are intentional.
#88509 28/06/04 08:45 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
it again is not centered frown i gave res 1024x768 and it all moved left smirk

#88510 28/06/04 08:53 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Like I said, it will only be the correct size at the time that the command is given. If the window is resized, or the font, font size, or resolution are changed then it will not be centred. Without using a custom window there is no way to prevent that.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#88511 28/06/04 09:05 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
ah well.. life sux smile)

thanks for trying


Link Copied to Clipboard