JustMacros - Problem with Extended values

Questions about ATEM Switchers, Camera Converter and everything live!
  • Author
  • Message
Offline
User avatar

Grzegorz Staszek

  • Posts: 7
  • Joined: Fri May 10, 2013 8:16 am

JustMacros - Problem with Extended values

PostWed Mar 28, 2018 11:00 am

Hello
I have a Script:

MIXER_NO = 1;
ME_NO = 1;
KEY_NO = 1;

ATEMMixerMEKeySetOnAir( MIXER_NO, ME_NO, 1, "TRUE" );
ATEMMixerMEKeySetKeyType( MIXER_NO, ME_NO, 1, "DVE" );
ATEMMixerMEKeySetFillSource( MIXER_NO, ME_NO, KEY_NO, 11 );
ATEMMixerMEKeyDVESetWidthOut( MIXER_NO, ME_NO, KEY_NO, 0.5 );
ATEMMixerMEKeyDVESetWidthIn( MIXER_NO, ME_NO, KEY_NO, 0);
ATEMMixerMEKeyFlySetStretch( MIXER_NO, ME_NO, KEY_NO, 1, 1);
ATEMMixerMEKeyFlySetPosition( MIXER_NO, ME_NO, KEY_NO, 8.000,4.000);

lvStartPos = ATEMMixerMEKeyFlyGetOffsetX( MIXER_NO, 1, KEY_NO )
for i = 1, 18 do
ATEMMixerMEKeyFlySetOffsetX( MIXER_NO, 1, KEY_NO, lvStartPos - (i * 0.6));
Sleep(20);
end;



I haveI have a problem in line:
ATEMMixerMEKeyFlySetOffsetX( MIXER_NO, 1, KEY_NO, lvStartPos - (i * 0.6)); - It does not work
It works only when I enter integer values, e.g.:
ATEMMixerMEKeyFlySetOffsetX( MIXER_NO, 1, KEY_NO, lvStartPos - (i * 1)); - Is Ok.

The same problem is with other functions, eg the size of the PIP:
ATEMMixerMEKeyFlySetStretch( MIXER_NO, ME_NO, KEY_NO, 0.3, 0.3); - It does not work

Thank you for your help.
Best Regards
www.s2store.pl
Offline
User avatar

Xtreemtec

  • Posts: 5397
  • Joined: Wed Jan 02, 2013 11:48 am
  • Location: The Netherlands

Re: JustMacros - Problem with Extended values

PostWed Mar 28, 2018 6:04 pm

Integers can not have a point in their value.. So 0.6 will be treated as 0. Float values have decimals after the point. ;)
Daniel Wittenaar .:: Xtreemtec Media Productions ::. -= www.xtreemtec.nl =-
4K OBV Trailer, ATEM TVS HD, 4M/E Broadcast Studio 4K, Constelation 8K, Hyperdeck Studio 12G, Ursa Broadcast 4K, 4K fiber converters with Sony Control
Offline
User avatar

Grzegorz Staszek

  • Posts: 7
  • Joined: Fri May 10, 2013 8:16 am

Re: JustMacros - Problem with Extended values

PostWed Mar 28, 2018 7:40 pm

The command looks like this:

ATEMMixerMEKeyFlySetStretch( Integer, Integer, Integer, Extended, Extended )

So, ATEMMixerMEKeyFlySetStretch( 1, 1, 1, 0.3, 0.3 ) should be the correct parameters?
Best Regards
www.s2store.pl
Offline

Asgeir Hustad

  • Posts: 335
  • Joined: Tue Sep 26, 2017 10:13 am
  • Location: Norway

Re: JustMacros - Problem with Extended values

PostWed Mar 28, 2018 8:29 pm

This seems like the problem that JustMacros has with your localization settings - Extended values are expected to use commas, not dots - but that doesn't work with LUA.

There is a lot of info about this on Atemuser.com - but that site has had some trouble the last week.
Offline
User avatar

Grzegorz Staszek

  • Posts: 7
  • Joined: Fri May 10, 2013 8:16 am

Re: JustMacros - Problem with Extended values

PostThu Mar 29, 2018 6:44 am

How to fix it? I did not find any information at Atemuser.com
Best Regards
www.s2store.pl
Offline
User avatar

Tom_Bassford

  • Posts: 1665
  • Joined: Wed Aug 22, 2012 8:12 am
  • Location: Europe / UK

Re: JustMacros - Problem with Extended values

PostThu Mar 29, 2018 7:29 am

Just macros seems to work best with english windows.


Sent from my iPhone using Tapatalk
http://www.atemuser.com
if it was easy it wouldn't be called engineering
Offline
User avatar

Grzegorz Staszek

  • Posts: 7
  • Joined: Fri May 10, 2013 8:16 am

Re: JustMacros - Problem with Extended values

PostThu Mar 29, 2018 8:10 am

I find answer at Atemuser.com

JohnBengston wrote:

My guess is you need to

My guess is you need to change your Decimal separator to be a "." instead of a comma. (Control-Panel - Region & Language - Additional Settings - Decimal symbol)

Or

Change your code such that it reads

ATEMMixerMESetTransitionPosition(1,1,"0,564")

Just Macros requires decimal values using a full-stop (dot) not a comma, however if you make the floating point value a string (by putting it in quotes), it will accept this.

Obviously if you use a comma as a decimal separator and don't use quotes, JM can't tell the difference between it being 3 params where the last is a float, or 4 params.


Thank You
Best Regards
www.s2store.pl
Offline

Vladimir Fedorchuk

  • Posts: 2
  • Joined: Thu Jun 15, 2017 1:54 pm

Re: JustMacros - Problem with Extended values

PostSun Apr 21, 2019 7:56 pm

Grzegorz Staszek, God bless you! And JohnBengston, who wrote this:
My guess is you need to change your Decimal separator to be a "." instead of a comma. (Control-Panel - Region & Language - Additional Settings - Decimal symbol)

Or

Change your code such that it reads

ATEMMixerMESetTransitionPosition(1,1,"0,564")

Thank you indeed

Return to Live Production

Who is online

Users browsing this forum: MartinOstby, W3C [Validator] and 88 guests