Forums > MaxMSP

serial object in stand alone

March 8, 2008 | 6:01 pm

Does anyone know a way to change the port in the serial object between ‘a’ and ‘b’ in a way suitable to use in a stand alone application (where it cannot be typed in or reinitialized)?

Thanks in advance.


March 8, 2008 | 6:54 pm

Hi. I just made this patch so maybe I got something wrong but I think this will do it.

max v2;
#N vpatcher 181 84 883 552;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 129 118 37 196617 port b;
#P message 35 118 37 196617 print;
#P newex 35 140 75 196617 serial a 2400;
#B color 5;
#P user umenu 414 222 100 196647 1 64 238 1;
#X add port;
#X add Bluetooth-PDA-Sync;
#X add Bluetooth-Modem;
#P newex 414 173 47 196617 zl iter 1;
#B color 5;
#P message 349 103 37 196617 print;
#P newex 349 125 75 196617 serial a 2400;
#B color 5;
#P newex 414 197 91 196617 sprintf append %s;
#P window linecount 3;
#P comment 387 87 112 196617 press this to set output list of available ports in the menu;
#P window linecount 1;
#P message 380 221 33 196617 clear;
#P newex 414 244 27 196617 – 1;
#P comment 331 222 100 196617 clear list;
#P newex 414 265 83 196617 sprintf port %ld;
#P newex 414 150 46 196617 sel read;
#P message 77 118 37 196617 port a;
#P window linecount 2;
#P comment 524 218 100 196617 set port by selecting item from list;
#P comment 36 91 165 196617 set port by click on message box of desired port;
#P window linecount 1;
#P comment 65 55 100 196617 the easy way;
#P comment 382 59 100 196617 the otherway;
#P connect 18 0 16 0;
#P connect 4 0 16 0;
#P connect 17 0 16 0;
#P fasten 6 0 12 0 419 299 521 299 521 123 354 123;
#P connect 13 0 12 0;
#P fasten 12 1 5 0 419 139 419 139;
#P fasten 5 1 14 0 455 170 419 170;
#P connect 14 0 11 0;
#P hidden connect 9 0 15 0;
#P connect 11 0 15 0;
#P connect 15 0 8 0;
#P connect 8 0 6 0;
#P pop;


March 8, 2008 | 7:10 pm

Oops, I feel silly. I should have tried that.

The easy way should work just fine. Thanks.


Viewing 3 posts - 1 through 3 (of 3 total)