time and using linux app
-
good but how to use for example oog or totem the app off linux in it?? thanks. valhamdolelah.
if i understand what you want to do... system "oog" == 0 or die $!; sleep(10); system "totem" == 0 or die $!; whatever the syntax for those linux apps are, please fill in.
-
if i understand what you want to do... system "oog" == 0 or die $!; sleep(10); system "totem" == 0 or die $!; whatever the syntax for those linux apps are, please fill in.
thanks i exactly want the thing that you have wrote.but please let me find what is the below error: #!/scr/bin/perl -w #use strict; use warnings; system "oog" == 0 or die $!; sleep(10); system "totem" == 0 or die $!; =pod Argument "oog" isn't numeric in numeric eq (==) at perl.pl line 4. Can't exec "1": No such file or directory at perl.pl line 4. Argument "totem" isn't numeric in numeric eq (==) at perl.pl line 6. Can't exec "1": No such file or directory at perl.pl line 6. =cut __END__ valhamdolelah.
-
thanks i exactly want the thing that you have wrote.but please let me find what is the below error: #!/scr/bin/perl -w #use strict; use warnings; system "oog" == 0 or die $!; sleep(10); system "totem" == 0 or die $!; =pod Argument "oog" isn't numeric in numeric eq (==) at perl.pl line 4. Can't exec "1": No such file or directory at perl.pl line 4. Argument "totem" isn't numeric in numeric eq (==) at perl.pl line 6. Can't exec "1": No such file or directory at perl.pl line 6. =cut __END__ valhamdolelah.
hmmm.... didn't expect that. I wonder which version of Perl that you are using. try this: system("oog") == 0 or die $! etc...
-
hmmm.... didn't expect that. I wonder which version of Perl that you are using. try this: system("oog") == 0 or die $! etc...
thanks for your replies this is my perl version: This is perl, v5.10.0 built for i386-linux-thread-multi i used this command: #!/scr/bin/perl -w use strict; use warnings; #system "oog" == 0 or die $!; sleep(3); my $music="/home/sajad/intertainment/Music/001.MP3"; system "totem --play $music"; sleep(8); system "totem --quit $music"; exit; but i want to play a music and then at finish i want to close it but none of the command i write after system "totem --play $music"; are executed until i manually close the totem ,how i can solve this error???? thanks in advance. valhamdolelah.
-
thanks for your replies this is my perl version: This is perl, v5.10.0 built for i386-linux-thread-multi i used this command: #!/scr/bin/perl -w use strict; use warnings; #system "oog" == 0 or die $!; sleep(3); my $music="/home/sajad/intertainment/Music/001.MP3"; system "totem --play $music"; sleep(8); system "totem --quit $music"; exit; but i want to play a music and then at finish i want to close it but none of the command i write after system "totem --play $music"; are executed until i manually close the totem ,how i can solve this error???? thanks in advance. valhamdolelah.
-
try using exec "totem --play $music"; iirc, exec does not wait for the command to return output and system does.
-
oh this also not work!! after playing the music it stopped and is on the screen yet. indeed i want to use a linux app and after some works close it with some command as this thing i posted.it can be a music or a program. thanks.
-
ok, for clarification... is it still not stopping after 8 seconds? because otherwise all you would need to do is change your second system to exec, because it would be hanging up there.
i wrote this : #!/scr/bin/perl -w use strict; use warnings; my $music="/home/sajad/intertainment/Music/001.MP3"; system "totem --play $music"; sleep(8); exec "totem --quit $music"; exit; after playing the music in 6 second(time of music) then it stopped until i close it then the command sleep(8) is running and after it terminate my program.i also wrote this code but as above result: #!/scr/bin/perl -w use strict; use warnings; my $music="/home/sajad/intertainment/Music/001.MP3"; system "totem --play $music"; exec "totem --quit $music"; exit;
-
i wrote this : #!/scr/bin/perl -w use strict; use warnings; my $music="/home/sajad/intertainment/Music/001.MP3"; system "totem --play $music"; sleep(8); exec "totem --quit $music"; exit; after playing the music in 6 second(time of music) then it stopped until i close it then the command sleep(8) is running and after it terminate my program.i also wrote this code but as above result: #!/scr/bin/perl -w use strict; use warnings; my $music="/home/sajad/intertainment/Music/001.MP3"; system "totem --play $music"; exec "totem --quit $music"; exit;
-
ok... so you changed
system "totem --quit $music";
to
exec "totem --quit $music";
correct? did you try the change I suggested which was:
system "totem --play $music";
to
exec "totem --play $music";
yes i also change it to all of states with changing exec to system or system to exec but it play the music repeatedly also this is one of them: #!/scr/bin/perl -w use strict; use warnings; #system "oog" == 0 or die $!; sleep(3); my $music="/home/sajad/intertainment/Music/001.MP3"; system "totem --play $music && totem --quit $music"; #sleep(8); system "totem --quit $music";#exec "totem --quit $music"; exit;