[Scilab-users] Command lauch using a string

Stefan Du Rietz sdr at durietz.se
Fri May 15 10:07:48 CEST 2015


On 2015-05-14 22:51, paul.carrico at free.fr wrote:
> Dear All,
>
> I've been thinking in creating a string in order to run specific instructions afterward (I'm under Windows OS for the moement);
>
> An example of my code:
> #########################################################################
> A = 'PATH_IMAGEMAGICK + ''\convert -delay 50 ';
> for i = 1 : number
>      A = A + '-repage 1218x722+0+0 sample_geometry" + string(i) + ".gif ';
> end
> A = A + '-loop 0 superposition_anime.gif'',''-echo''';
> dos(A)
> #########################################################################
>
> It fails while if I replace the string A by the complete sentence, it works fine showing that's probably a format issue ... but honnestly I don't find the right one
>
> Any suggestion will be appreciated
>
> Thanks
>
> Paul
>
Have you tried to display the string A in Scilab?

-->PATH_IMAGEMAGICK = "c:\Path\to\Imagemagick"
  PATH_IMAGEMAGICK  =
  c:\Path\to\Imagemagick

// This is probably not what you want:
-->A = 'PATH_IMAGEMAGICK + ''\convert -delay 50 '
  A  =
  PATH_IMAGEMAGICK + '\convert -delay 50

// You probably want this:
-->A = PATH_IMAGEMAGICK + '\convert -delay 50 '
  A  =
  c:\Path\to\Imagemagick\convert -delay 50

Regards
Stefan




More information about the users mailing list