Delete a space in a text box


    Sep 27 2007 | 9:30 am

    • Sep 27 2007 | 10:09 am
      use sprintf instead of prepend to join strings
      max
      On Sep 27, 2007, at 11:30 AM, cedric dumetz wrote:
      > Hi all,
      >
      > I'm trying to delete a space in a text box.
      > The text box contain an address of a file (like C:/ Clip0.mov), but
      > for it work i should have C:/Clip0.mov (without the space)
      > Predend make automatically it.
      >
      > Thanks for your attention.
      >
      >
      >
      > max v2;
      > #N vpatcher 95 94 695 494;
      > #P origin -41 0;
      > #P window setfont "Sans Serif" 9.;
      > #P newex 200 128 27 9109513 t b b;
      > #P newex 201 107 45 9109513 loadbang;
      > #P newex 112 105 56 9109513 loadmess 0;
      > #P newex 79 195 74 9109513 prepend append;
      > #P number 70 108 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 291 193 57 9109513 prepend set;
      > #P message 196 252 185 9109513 D:/ Clip0.mov;
      > #P newex 249 106 73 9109513 loadmess path;
      > #P newex 292 149 57 9109513 prepend set;
      > #P message 292 172 257 9109513 D:/;
      > #N thispatcher;
      > #Q end;
      > #P newobj 249 127 54 9109513 thispatcher;
      > #P message 79 173 152 9109513 Clip0.mov;
      > #P newex 70 128 102 9109513 sprintf set Clip%i.mov;
      > #P window linecount 2;
      > #P comment 196 271 100 9109513 I want to delete the space before
      > Clip0;
      > #P connect 9 0 1 0;
      > #P connect 11 0 1 0;
      > #P connect 1 0 2 0;
      > #P connect 13 0 2 0;
      > #P connect 2 0 10 0;
      > #P connect 8 0 7 0;
      > #P connect 10 0 7 0;
      > #P connect 12 0 13 0;
      > #P connect 6 0 3 0;
      > #P connect 4 0 8 0;
      > #P connect 3 1 5 0;
      > #P connect 5 0 4 0;
      > #P connect 13 1 4 0;
      > #P pop;
      >
      >
      >
      >
      > La nouvelle version de MSN Hotmail! Windows Live Hotmail
      _____________________________________________
      m a x i m i l i a n m a r c o l l
    • Sep 27 2007 | 10:25 am
    • Sep 27 2007 | 10:28 am
      Hi,
      why not keep on using [sprintf] ??
      max v2;
    • Sep 27 2007 | 10:42 am
      Hi,
      Just for the record, I would recommend the use of the symout argument
      in thoses cases, in order to take care of the possible spaces in the
      file/folder names. If you use [sprintf symout %s%s] you're certain to
      get a valid symbol.
      Cheers,
      ej
    • Sep 27 2007 | 11:37 am
      hi cedric,
      try using sprintf con construct the filename, eg.:
      On Sep 27, 2007, at 4:30 AM, cedric dumetz wrote:
      > Hi all,
      >
      > I'm trying to delete a space in a text box.
      > The text box contain an address of a file (like C:/ Clip0.mov), but
      > for it work i should have C:/Clip0.mov (without the space)
      > Predend make automatically it.
      >
      > Thanks for your attention.
      >
      >
      >
      > max v2;
      > #N vpatcher 95 94 695 494;
      > #P origin -41 0;
      > #P window setfont "Sans Serif" 9.;
      > #P newex 200 128 27 9109513 t b b;
      > #P newex 201 107 45 9109513 loadbang;
      > #P newex 112 105 56 9109513 loadmess 0;
      > #P newex 79 195 74 9109513 prepend append;
      > #P number 70 108 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 291 193 57 9109513 prepend set;
      > #P message 196 252 185 9109513 D:/ Clip0.mov;
      > #P newex 249 106 73 9109513 loadmess path;
      > #P newex 292 149 57 9109513 prepend set;
      > #P message 292 172 257 9109513 D:/;
      > #N thispatcher;
      > #Q end;
      > #P newobj 249 127 54 9109513 thispatcher;
      > #P message 79 173 152 9109513 Clip0.mov;
      > #P newex 70 128 102 9109513 sprintf set Clip%i.mov;
      > #P window linecount 2;
      > #P comment 196 271 100 9109513 I want to delete the space before
      > Clip0;
      > #P connect 9 0 1 0;
      > #P connect 11 0 1 0;
      > #P connect 1 0 2 0;
      > #P connect 13 0 2 0;
      > #P connect 2 0 10 0;
      > #P connect 8 0 7 0;
      > #P connect 10 0 7 0;
      > #P connect 12 0 13 0;
      > #P connect 6 0 3 0;
      > #P connect 4 0 8 0;
      > #P connect 3 1 5 0;
      > #P connect 5 0 4 0;
      > #P connect 13 1 4 0;
      > #P pop;
      >
      >
      >
      >
      > La nouvelle version de MSN Hotmail! Windows Live Hotmail