Having trouble with write filepath in jit.grab

Nov 9, 2006 at 10:27pm

Having trouble with write filepath in jit.grab

Hello. I am having trouble getting jit.qt.grab to write to a particular folder. I have set up a robot to create the unique file name, but i can’t seem to concatenate the correct string to save the file.

any help?

-oliver

max v2;
#N vpatcher 0 44 1106 693;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 245 57 151 196617 find the searchpath;
#P message 67 154 317 196617 oliver:/Users/admin/Desktop/_InteractiveDesign/drummachince/;
#P button 67 83 15 0;
#P newex 67 131 62 196617 prepend set;
#P newex 67 106 78 196617 filepath default;
#B color 5;
#P comment 309 230 219 196617 this saves the file to the folder entitled one;
#P newex 349 446 60 196617 loadmess 2;
#P newex 159 484 48 196617 loadbang;
#P number 330 469 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user incdec 330 447 15 15 0 0;
#P newex 330 489 32 196617 * 15;
#P message 526 532 33 196617 close;
#P message 493 532 30 196617 open;
#P flonum 472 512 35 9 0.5 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 438 512 15 0;
#P newex 438 532 44 196617 metro 2;
#P newex 83 580 95 196617 jit.qt.grab 320 240;
#B color 5;
#P number 330 512 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 331 532 82 196617 write_length $1;
#P toggle 245 512 15 0;
#P message 245 532 75 196617 write_audio $1;
#P toggle 159 512 15 0;
#P message 159 532 78 196617 write_video $1;
#P newex 580 346 62 196617 prepend set;
#P message 580 372 368 196617 write oliver:/Users/admin/Desktop/videos/two/58.mov 30. jpeg normal;
#P newex 580 305 160 196617 sprintf write %s 30. jpeg normal;
#P newex 580 252 258 196617 sprintf oliver:/Users/admin/Desktop/videos/two/%s;
#P message 763 305 244 196617 oliver:/Users/admin/Desktop/videos/two/58.mov;
#P newex 763 281 62 196617 prepend set;
#P button 531 124 15 0;
#P button 606 126 15 0;
#P message 606 47 57 196617 folder two;
#P message 531 47 55 196617 folder one;
#P message 546 146 14 196617 0;
#P message 565 146 14 196617 1;
#P user gswitch2 551 182 39 32 1 0;
#P newex 83 348 62 196617 prepend set;
#P message 83 374 368 196617 write oliver:/Users/admin/Desktop/videos/one/57.mov 30. jpeg normal;
#P newex 83 307 160 196617 sprintf write %s 30. jpeg normal;
#P newex 83 254 256 196617 sprintf oliver:/Users/admin/Desktop/videos/one/%s;
#P message 266 307 244 196617 oliver:/Users/admin/Desktop/videos/one/57.mov;
#P newex 266 283 62 196617 prepend set;
#P newex 438 152 62 196617 prepend set;
#P message 438 176 45 196617 58.mov;
#P button 438 74 15 0;
#P newex 438 126 79 196617 sprintf %s.mov;
#N counter 0 100;
#X flags 0 0;
#P newobj 438 103 73 196617 counter 0 100;
#P comment 820 230 219 196617 this saves the file to the folder entitled two;
#P user panel 56 69 341 114;
#X brgb 229 229 218;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 569 241 470 180;
#X brgb 108 137 95;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P user panel 57 241 470 180;
#X brgb 150 166 82;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P user panel 520 40 189 31;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P connect 49 0 47 0;
#P connect 47 0 48 0;
#P connect 48 0 50 0;
#P fasten 16 0 12 0 556 220 88 220;
#P connect 12 0 13 0;
#P fasten 13 0 15 0 88 335 88 335;
#P connect 15 0 14 0;
#P fasten 27 0 35 0 585 435 88 435;
#P connect 14 0 35 0;
#P fasten 40 0 35 0 531 564 88 564;
#P fasten 39 0 35 0 498 564 88 564;
#P fasten 36 0 35 0 443 564 88 564;
#P fasten 33 0 35 0 336 563 88 563;
#P fasten 31 0 35 0 250 563 88 563;
#P fasten 29 0 35 0 164 563 88 563;
#P connect 44 0 30 0;
#P connect 30 0 29 0;
#P fasten 44 0 32 0 164 506 250 506;
#P connect 32 0 31 0;
#P fasten 12 0 10 0 88 277 271 277;
#P connect 10 0 11 0;
#P connect 42 0 43 0;
#P connect 45 0 43 0;
#P connect 43 0 41 0;
#P connect 41 0 34 0;
#P connect 34 0 33 0;
#P fasten 20 0 7 0 611 69 443 69;
#P fasten 19 0 7 0 536 65 443 65;
#P connect 7 0 5 0;
#P connect 5 0 6 0;
#P fasten 6 0 9 0 443 151 443 151;
#P connect 9 0 8 0;
#P connect 37 0 36 0;
#P connect 38 0 36 1;
#P connect 19 0 22 0;
#P fasten 22 0 18 0 536 142 551 142;
#P fasten 17 0 16 0 570 171 556 171;
#P fasten 18 0 16 0 551 171 556 171;
#P fasten 21 0 17 0 611 143 570 143;
#P fasten 6 0 16 1 443 122 585 122;
#P fasten 16 1 25 0 585 228 585 228;
#P connect 25 0 26 0;
#P fasten 26 0 28 0 585 333 585 333;
#P connect 28 0 27 0;
#P connect 20 0 21 0;
#P fasten 25 0 23 0 585 275 768 275;
#P connect 23 0 24 0;
#P pop;

#28615
Nov 13, 2006 at 2:17am

Here is a patch that will automatically generate a save statement to folders named “one” and “two” that have been created in the same folder that the patch is stored on your harddrive.

-oliver
—————————————————-
—————————————————-
———————————-

max v2;
#N vpatcher 24 47 643 299;
#P origin 546 87;
#P user panel 495 67 32 101;
#X brgb 2 49 130;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 473 67 32 101;
#X brgb 2 59 180;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont “Sans Serif” 9.;
#P hidden message 542 109 26 196617 240;
#P hidden message 541 89 26 196617 120;
#P hidden message 541 70 20 196617 60;
#P user panel 518 67 32 101;
#X brgb 22 26 43;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P message 360 100 14 196617 3;
#P message 342 100 14 196617 2;
#P message 323 100 14 196617 1;
#P window setfont “Sans Serif” 10.;
#P comment 373 100 59 196618 minutes;
#B frgb 58 58 58;
#P window setfont “Sans Serif” 9.;
#P hidden newex -40 208 27 196617 +;
#P hidden newex -138 60 94 196617 bgcolor 50 50 100;
#P window linecount 3;
#P hidden comment 398 229 128 196617 < <<<<<< delays stop message for specified number of seconds;
#P hidden number 363 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont “Sans Serif” 12.;
#P window linecount 2;
#P comment 200 129 123 196620 < < #B frgb 255 255 255;
#P button 165 131 29 0;
#P window setfont “Sans Serif” 14.;
#P window linecount 1;
#P comment 474 43 100 196622 close grab;
#B frgb 255 255 255;
#P button 457 45 16 0;
#P window setfont “Sans Serif” 9.;
#P hidden message 139 456 33 196617 close;
#P window setfont “Sans Serif” 14.;
#P comment 474 22 89 196622 open grab;
#B frgb 255 255 255;
#P button 457 24 16 0;
#P window setfont “Sans Serif” 9.;
#P hidden newex -82 383 48 196617 loadbang;
#P user incdec 323 121 15 15 0 0;
#P number 342 121 38 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 362 175 44 196617 * 1000;
#P hidden newex 362 228 34 196617 delay;
#P message 233 104 57 196617 folder two;
#P message 170 104 55 196617 folder one;
#P hidden newex 319 339 55 196617 delay 250;
#P hidden message 134 386 386 196617 write oliver:/Users/admin/Desktop/one/;
#P hidden newex 192 341 62 196617 prepend set;
#P hidden newex 192 308 86 196617 sprintf write %s;
#P hidden button 205 193 15 0;
#P hidden button 303 197 15 0;
#N vpatcher 54 141 1165 776;
#P origin 25 187;
#P window setfont “Sans Serif” 9.;
#P newex 843 139 48 196617 loadbang;
#P comment 197 473 100 196617 take out spaces;
#P comment 991 225 100 196617 append folder two;
#P comment 749 225 100 196617 append folder one;
#P outlet 63 569 15 0;
#P inlet 744 125 15 0;
#P inlet 475 120 15 0;
#P newex 1010 288 78 196617 prepend symbol;
#P message 1052 313 35 196617 set $1;
#P newex 1010 266 51 196617 tosymbol;
#B color 5;
#P message 1052 333 203 196617 oliver:/Users/admin/Desktop/two/;
#P newex 1010 241 84 196617 sprintf %s two/;
#P button 1010 177 15 0;
#P newex 1010 200 78 196617 filepath default;
#B color 5;
#P button 473 150 15 0;
#P hidden newex 220 453 98 196617 loadmess separator;
#P newex 140 492 78 196617 prepend symbol;
#P message 140 513 35 196617 set $1;
#P newex 140 470 51 196617 tosymbol;
#B color 5;
#P message 155 570 227 196617 oliver:/Users/admin/Desktop/one/;
#P button 740 150 15 0;
#P newex 125 405 62 196617 prepend set;
#P message 125 428 218 196617 oliver:/Users/admin/Desktop/one/;
#P newex 125 381 75 196617 sprintf %s %s;
#P button 511 270 15 0;
#P button 530 269 15 0;
#P message 571 195 57 196617 folder two;
#P message 496 195 55 196617 folder one;
#P message 511 298 14 196617 0;
#P message 530 298 14 196617 1;
#P user gswitch2 521 331 39 32 1 0;
#P newex 385 291 62 196617 prepend set;
#P message 385 314 45 196617 1.mov;
#P button 360 226 15 0;
#P newex 386 267 79 196617 sprintf %s.mov;
#N counter 0 100;
#X flags 0 0;
#P newobj 385 242 73 196617 counter 0 100;
#P hidden newex 870 229 98 196617 loadmess separator;
#P newex 767 289 78 196617 prepend symbol;
#P message 809 314 35 196617 set $1;
#P newex 767 267 51 196617 tosymbol;
#B color 5;
#P message 809 334 203 196617 oliver:/Users/admin/Desktop/one/;
#P newex 767 242 82 196617 sprintf %s one/;
#P button 767 176 15 0;
#P newex 767 199 78 196617 filepath default;
#B color 5;
#P comment 312 269 100 196617 append $i.mov;
#P comment 833 269 171 196617 < <<<----- take out spaces ----->>>>;
#P comment 204 384 100 196617 join strings;
#P user panel 485 188 189 31;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P connect 29 0 43 0;
#P fasten 40 0 24 0 1015 397 130 397;
#P fasten 27 0 24 0 745 176 130 176;
#P fasten 10 0 24 0 772 402 130 402;
#P fasten 33 0 24 0 478 422 130 422;
#P connect 24 0 26 0;
#P connect 26 0 25 0;
#P connect 24 0 29 0;
#P connect 32 0 29 0;
#P connect 25 0 29 0;
#P connect 29 0 31 0;
#P connect 31 0 30 0;
#P fasten 33 0 28 0 478 366 160 366;
#P connect 30 0 28 0;
#P fasten 17 0 24 1 526 509 195 509;
#P fasten 17 1 24 1 555 383 195 383;
#P fasten 21 0 14 0 576 211 365 211;
#P fasten 20 0 14 0 501 214 365 214;
#P connect 14 0 12 0;
#P fasten 13 0 16 0 391 286 390 286;
#P connect 16 0 15 0;
#P connect 12 0 13 0;
#P fasten 41 0 33 0 480 142 478 142;
#P fasten 33 0 20 0 478 168 501 168;
#P connect 20 0 23 0;
#P fasten 23 0 19 0 516 294 516 294;
#P fasten 18 0 17 0 535 320 526 320;
#P fasten 19 0 17 0 516 320 526 320;
#P connect 21 0 22 0;
#P fasten 22 0 18 0 535 293 535 293;
#P fasten 13 0 17 1 391 290 555 290;
#P fasten 27 0 21 0 745 409 576 409;
#P fasten 42 0 27 0 749 145 745 145;
#P connect 47 0 5 0;
#P fasten 33 0 5 0 478 171 772 171;
#P connect 5 0 4 0;
#P connect 4 0 6 0;
#P hidden fasten 11 0 8 0 875 252 772 252;
#P connect 6 0 8 0;
#P connect 8 0 10 0;
#P connect 10 0 9 0;
#P connect 9 0 7 0;
#P connect 47 0 35 0;
#P fasten 27 0 35 0 745 165 1015 165;
#P connect 35 0 34 0;
#P connect 34 0 36 0;
#P fasten 11 0 38 0 875 261 1015 261;
#P connect 36 0 38 0;
#P connect 38 0 40 0;
#P connect 40 0 39 0;
#P connect 39 0 37 0;
#P pop;
#P hidden newobj 192 274 97 196617 p file_concatenator;
#P user jit.pwindow 68 87 82 62 1 1 0 0 1 0;
#P hidden message 96 456 30 196617 open;
#P hidden flonum 30 437 35 9 0.5 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden toggle -4 437 15 0;
#P hidden newex -4 456 44 196617 metro 2;
#P hidden newex -4 479 95 196617 jit.qt.grab 320 240;
#B color 5;
#P hidden toggle -82 437 15 0;
#P hidden message -82 456 75 196617 write_audio $1;
#P hidden toggle -167 439 15 0;
#P hidden message -167 457 78 196617 write_video $1;
#P hidden message 177 456 27 196617 stop;
#P hidden message 56 456 33 196617 write;
#P window setfont “Sans Serif” 10.;
#P comment 384 123 53 196618 seconds;
#B frgb 150 0 0;
#P window setfont “Sans Serif” 12.;
#P comment 167 81 135 196620 start record///////;
#B frgb 150 0 0;
#P comment 313 80 117 196620 time of movie////;
#B frgb 150 0 0;
#P window setfont Helvetica 20.;
#P comment 135 44 371 1376276 set movie time before you record!;
#B frgb 255 207 43;
#P user panel 165 80 140 45;
#X brgb 246 183 187;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 60 80 82 78;
#X brgb 255 248 190;
#X frgb 0 0 0;
#X border 0;
#X rounded 22;
#X shadow 0;
#X done;
#P user panel 311 80 122 63;
#X brgb 246 183 187;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 113 80 44 78;
#X brgb 255 248 190;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P hidden comment 376 339 128 196617 < <<<<< #P window linecount 1;
#P hidden comment 283 310 100 196617 < < #P user panel 393 80 51 63;
#X brgb 246 183 187;
#X frgb 0 0 0;
#X border 0;
#X rounded 15;
#X shadow 0;
#X done;
#P user panel 51 67 434 101;
#X brgb 42 73 238;
#X frgb 0 0 0;
#X border 0;
#X rounded 33;
#X shadow 0;
#X done;
#P comment 424 169 135 196617 i made this! -oliver *2006;
#B frgb 13 11 54;
#P window linecount 3;
#P comment 76 20 229 196617 don’t forget to make folders titled “one” and “two” in the same folder that this patch is saved in &…;
#B frgb 255 255 255;
#P hidden connect 39 0 17 0;
#P hidden connect 17 0 16 0;
#P hidden connect 39 0 19 0;
#P hidden connect 19 0 18 0;
#P hidden connect 39 0 22 0;
#P hidden connect 22 0 21 0;
#P hidden connect 21 0 20 0;
#P hidden connect 16 0 20 0;
#P hidden connect 18 0 20 0;
#P hidden connect 14 0 20 0;
#P hidden connect 15 0 20 0;
#P hidden connect 24 0 20 0;
#P hidden connect 31 0 20 0;
#P hidden connect 42 0 20 0;
#P hidden connect 23 0 21 1;
#P hidden fasten 20 0 25 0 1 512 74 512;
#P hidden fasten 40 0 24 0 462 328 101 328;
#P hidden connect 32 0 31 0;
#P hidden connect 30 0 31 0;
#P hidden fasten 43 0 42 0 462 425 144 425;
#P hidden fasten 35 0 15 0 367 449 182 449;
#P hidden fasten 45 0 15 0 170 315 182 315;
#P hidden connect 28 0 26 0;
#P hidden connect 26 0 29 0;
#P hidden connect 29 0 30 0;
#P hidden connect 33 0 28 0;
#P hidden fasten 27 0 26 1 308 219 284 219;
#P hidden connect 34 0 27 0;
#P hidden fasten 28 0 32 0 210 226 324 226;
#P hidden fasten 27 0 32 0 308 259 324 259;
#P hidden connect 37 0 38 0;
#P hidden connect 56 0 37 0;
#P hidden connect 57 0 37 0;
#P hidden connect 58 0 37 0;
#P hidden connect 38 0 37 0;
#P hidden connect 37 0 36 0;
#P hidden connect 28 0 35 0;
#P hidden connect 27 0 35 0;
#P hidden connect 36 0 47 0;
#P hidden connect 47 0 35 1;
#P hidden connect 52 0 56 0;
#P hidden connect 53 0 57 0;
#P hidden connect 54 0 58 0;
#P pop;

#88139

You must be logged in to reply to this topic.