Annonce

>>> Bienvenue sur codelab! >>> Première visite ? >>> quelques mots sur codelab //// une carte des membres//// (apéros) codelab


#1 2013-05-31 16:49:57 shell object and spaces…

reno-
membre
Date d'inscription: 2010-01-12
Messages: 114

shell object and spaces…



Bonjour à tous,

j'ai un petit soucis avec un espace dans un path… normalement cela se passe très bien avec tosymbol, mais je souhaite créer un dossier dans l'arborescence de mon disque dur, donc j'utilise l'objet shell, et je n'arrive pas à faire ce que je souhaite avec cet objet.

un terminal accepte l'espace dans un path s'il est précédé d'un backslash, mais je ne sais pas comment le générer avec regexp.

Avant je faisais cette opération avec createfolder, mais l'objet n'a pas été porté en 64 Bits.

Peut-être quelqu'un a une solution pour l'espace et l'objet shell?

ou bien une autre solution pour créer un dossier?

par avance, merci !!


<pre><code>
----------begin_max5_patcher----------
650.3ocyW87jSBCE9L7WQlbvSUZR.BfGbFunWb7hGcbbfRrMqPfIIsaW2Y8u
cSBP2tqqJaoE8Bs4kGu226KueDt02CVzrmoffWA9Dvy6VeOOmHq.u90dv578
qpxUN0f0LkJeMCtnauu1HzJ92Y18xBP8REaqa1pqXZ26f6kxKcVno3pWhQCF
nSO8MsrNT.gfO2uUqjoXBctl2H9hjsR2oANM13H.NIx9Cp+wg2xhHQdsybv2
wDrc4C9pMWuZCWr9XigvNiEQCnn3jnvEfn3N6SOxnl.hKFhGhU1c991GKlUZ
KaJrlitvD5Yf0xbjVZVPJhjlPrbV3+qbV5H3rSI5InvfHTJEGaB+nKP3KXWa
v+.Nzr8N2CyaaYhR.40u.OQlI7ryLwztJyvfDTHBmt.zUjhS+cDC97QLlDeG
yT+sRtbhTC4zKz5qyhNG0Y87oIuJCgLlbV4Sci5l5hlpo1p+BkkQMzZVBIal
yw3BMnrQ7r5Jg9UVIFdZiqHItdOTRPJNKgZFW0OsZ9hdktzDaSL9SfS3n+3v
272yd3+nAOGh+er787BYt7lkuosshuxU5C93111Fod4GXW+1lpR1T68foWnJ
lvT6ynnnYaVkZCq5Y0+f7Dsh+CWUbA.VjKVOMZgDFFfwQXpo8ZFZ7YSNMfUb
wiu.sySV4OjvTMakqFfd+PFv89ojozbgKk5HcrWTFfOnzFdYISbbMUIWkWTw
b7E5IO4FKbvi.NYyFZBGAZRmOtgNlypGny+5iJxrglwjGGNanYLIN1dJyE4f
FAdRlW3f+KvI9DgSWGQyGnriIU8lzgDyvhqZj1kzEtkbQ2R23OnjsiOnuaB.
LWZ5UqMMp2J65kuOkB8s94N+eNmrauD
-----------end_max5_patcher-----------
</code></pre>

Hors ligne

 

#2 2013-05-31 22:32:34 Re : shell object and spaces…

jln
nouveau membre
Date d'inscription: 2009-04-13
Messages: 4

Re: shell object and spaces…



Salut,

Je n'ai pas la solution avec l'objet shell (il devrait fonctionner avec le path entre guillemets, non ?) mais pour te mettre en jambes, en revanche, il y a un objet Jamoma pour ça: jcom.folder. Il fonctionne en 64bits.

See you in Albi ;-)

Hors ligne

 

#3 2013-06-01 09:00:30 Re : shell object and spaces…

reno-
membre
Date d'inscription: 2010-01-12
Messages: 114

Re: shell object and spaces…



Oui, c'est vrai. Je connais jcom.folder. Mais pour des soucis d'intégration et de distribution, je souhaite a avoir le moins de dépendance possible. C'est quand même une truc tout simple de faire un dossier !!!

Bol, je continue a creuser, et a lundi jln !

Hors ligne

 

#4 2013-06-04 16:57:10 Re : shell object and spaces…

vic
membre
Date d'inscription: 2013-06-03
Messages: 152

Re: shell object and spaces…



étrange. Ca marche pas chez moi avec le ~ dans le terminal, mais ça marche comme ça :

mkdir "/Library/Application Support/NewFolder"

, mais par contre dans Max ça ne marche pas - il n'imprime pas d'erreur, juste done : bang ;
même chose avec

mkdir "/Library/Application Support/NewFolder" 2>&1

mais je sais pas du tout à quoi sert le 2>&1.
edit : ah, à afficher les erreurs, d'accord ^^

à cette nouvelle lumière, il apparaît qu'effectivement shell a du mal, beaucoup de mal, avec les espaces

EDIT : en regardant le helpfile du shell, c'est pas les espaces qui lui posent problème, c'est les guillemets. Il faut placer un \ avant chaque guillemet. Après galérer un peu avec join combine regexp tosymbol et autres joies, enfin trouvé la solution ! c'est sprintf !

<pre><code>
----------begin_max5_patcher----------
688.3oc0W0zbZCCE7r4WgFMS6Ipij+18PmIWZuz1K8XISGAVATpQ1ijf.MS9
uWIY6TRCTLd.MobvfdV548srZexOLxCNsZCUBAuG7cfm2Ci77rgLA7ZG6AWR
1LqjHsSCtjJkj4T33l6onaT13SfW8Y1TAQr8pqqqKYyHJVEG7sU00UB0Uekd
+WHa9XUYAULA1s5pUpRpRssl1.AHDbS6stshqjreYuQtOpMJe0RFWuDKVBZC
VSTyVv3y+gfNS0jHLFoWi9qX+bDBGkLFDEGZCk3id5gnSWCDr4C2FkUXqnpo
28tHLbG7vIKs3A9IJmtl.M24wQiLWF2S5iSuWm2WvdxZAiqtELo4C7Mxtech
TENX+bE9vbUJ1vKYwlq4lkCBPmDGg1KGcsfQJGBEcHE1xeVvDFF5DTZSbhVK
oQXg8SPwoQgFsV7oq0vnyrV6+pspIVk2f1jl6HdafBPPvGdK9hSi4VEWPH1O
BkkXzfQCfJybicGotlxKNiDyQs2vZmstcmoQ1HYmBwD5FhoVPsLiUp4JpQqY
5ZRNDpIvMTipRtc4zpRGwJgZ+n7zf7gwIXWIWzmZ.TTwovyRoiiZbgCR8yv4
oFaj1NYGt5Qur5icY0KUEZz.Oi+0ua42zV5zJ+TG0Op2cgt3MeZMRPMGdb.8
cvIN5b1Knk+CGjw.3TBe9Y1IIOyGiivIZ+0bzQjSA6wesumKzlRXIi+2uQmE
Zl3OmvjUqDy5p8tSxC9CxJnREiakU6NIs2F.+zjVvJJn7c2ITvjjokTaAf16
ecmU7D7r4bIgCtOrCxYvIrOji6fS1qK3XeT3ifmX2BmiQOotCN8.MgtaiURO
fC9U0FqLmYB1GWmbmgl9HbvnABmlFX5WNbMUHayoEI5d62UILCSFaGx3MCsY
DJnqYcyOajIaON52HMr3aB
-----------end_max5_patcher-----------
</code></pre>

edit : ~ signifie racine de l'utilisateur actif, ok. Etrangement, même dans le terminal, lorsqu'il est à l'intérieur de guillemets, ce signe ~ n'est plus compris du tout. Il doit falloir le faire précéder d'un caractère spécial pour qu'il soit à l'intérieur d'une parenthèse, mais lequel ? je ne le sais... en revanche il doit être possible de faire d'abord un cd ~ puis créer le dossier ? il a pas l'air d'aimer le cd...

Dernière modification par vic (2013-06-04 17:14:06)

Hors ligne

 

#5 2013-06-04 17:21:59 Re : shell object and spaces…

reno-
membre
Date d'inscription: 2010-01-12
Messages: 114

Re: shell object and spaces…



Yes !!
joli coup… j'avais regardé du côté de sprintf, mais je n'avais pas trouvé cette syntaxe…

merci beaucoup !!!

Hors ligne

 

#6 2013-06-04 17:42:27 Re : shell object and spaces…

reno-
membre
Date d'inscription: 2010-01-12
Messages: 114

Re: shell object and spaces…



ok, le problème du tilde se regle avec l'objet [conformpath]

ca y est, problème reglé totalement…

Yeaahh !!

<pre><code>
----------begin_max5_patcher----------
630.3ocyV1zbaBCDF9L7qPCyjdhhQByW8PmlK8TmdoGa6jgOjsUJHwHIRbZl
ze6EILIDaZL1X6o9fvRrn8ceztK7nogUJaMVXA9.36.CiGMMLzKoVvXybCqx
j0YEIBsYVT78rzasraukDuVpWthSnRvmpXU0U.X2sWvnRZRIVax0bRRQ2cpR
jYqHzk2vwYxV+i7bbsAH2X0k3MSbbA+byiPx0aSi2eOB0sOz5RVsr.K0pysm
eEjeq8KD439hwDZmsP0ZOYZpFrmVvKYhGJSYESHrgn4Ny8hCBBsAAswNrWr2
FixGpvsOjk0fXwcXr.67NGKvTYhjvn8UPPfxg9t9pKtaFd1AuBldmcXJzoRK
.WIl8U78fOyJxw7IP13PmX+3vvnFH6EejjEF91j8BynSPB2b8g8QmpAi9uBH
hU3hIU9EoS6872oqyt3vFXklPWNLV7GFKn8TAFgzUfnn8WAhtXUfk+JmvA+n
8m0Uht+APe7cSoEObd7y85f9Ai.4ChZuCHC7DBsRrPjrDuC09yruPR4I7Glc
cUUAISeFC9VcUEiKmBsBaG0oFv3CmSvoWohNcIWYL5BFurIbWAZrGjxXSgNg
Pm4gwQQwpzJ2QzLqo5sI4dPR4E71EuGZOMsOrJHzs+BKcznV+03Svp4YcBs6
sNfWBlbrPRn57pdFodoeOiVQxywz9eLTNQjjVf0wo6fGjiUOJ.sW8rknOm5Q
0sc+7Ac4zi2X3i+ESOakZ7Ozi2kiOQiPOakjcV0CbL7I5H0Sa4eRU0cXtXyd
pkRSexaYb0z.a8TBscptkrEGeGoydO8JI7llexlNe071diqClaYp7ySl+EvH
BIiA
-----------end_max5_patcher-----------
</code></pre>

Hors ligne

 

#7 2013-06-05 00:30:37 Re : shell object and spaces…

vic
membre
Date d'inscription: 2013-06-03
Messages: 152

Re: shell object and spaces…



Hahah pas toujours facile de formater différentes syntaxes avec max... enfin on y arrive !

Dernière modification par vic (2013-06-05 00:31:38)

Hors ligne

 

fil rss de cette discussion : rss

Pied de page des forums

Powered by FluxBB

codelab, graphisme & code : emoc / 2008-2024