PDA

View Full Version : Sizing



Mina
12-30-2005, 10:49 PM
I tried using the following during runtime:
-----------------------------------------
cS = Window.GetSize(Application.GetWndHandle());
mS = Plugin.GetSize("MediaPlayer");
ww = cS[1] + "10"
hh = cS[2] + "10"
Window.SetSize(Application.GetWndHandle(), ww, hh);
www = mS[1] + "10"
hhh = mS[2] + "10"
Plugin.SetSize("MediaPlayer", www, hhh);
-----------------------------------------

Why won't it work ?

Corey
12-30-2005, 10:52 PM
Hi. You are putting the number 10 in quotations, so it gets treated as a string instead of a number. Simply remove the quotation marks, i.e.:

ww = cS[1] + 10;

:yes

Mina
12-30-2005, 10:58 PM
Hi. You are putting the number 10 in quotations, so it gets treated as a string instead of a number. Simply remove the quotation marks, i.e.:

ww = cS[1] + 10;

:yes

It gives me an error:
------------------------------------
attempt to perform arithmetic on field '?' (a nil value)
------------------------------------

Corey
12-30-2005, 11:08 PM
Here's a working example of what you appear to be attempting, attached. It uses this code:

winSize = Window.GetSize(Application.GetWndHandle());
Window.SetSize(Application.GetWndHandle(), winSize.Width + 10, winSize.Height + 10);

:yes

Mina
12-30-2005, 11:13 PM
Vollkommen, which means "Perfect" in german :yes

Corey
12-31-2005, 12:26 AM
Hee. :D :yes