The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.0.11 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.0.11 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(844) : eval()'d code PHP 8.0.11 (Linux)
File Line Function
/global.php(844) : eval()'d code 34 errorHandler->error
/global.php 844 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.0.11 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5116 - File: inc/functions.php PHP 8.0.11 (Linux)
File Line Function
/inc/functions.php 5116 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7277 - File: inc/functions.php PHP 8.0.11 (Linux)
File Line Function
/inc/functions.php 7277 errorHandler->error
/inc/functions.php 5136 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.0.11 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



NaaLaa Forum
Run external commands - Printable Version

+- NaaLaa Forum (http://www.naalaa.com/community)
+-- Forum: NaaLaa (http://www.naalaa.com/community/forumdisplay.php?fid=1)
+--- Forum: Questions and discussions (http://www.naalaa.com/community/forumdisplay.php?fid=3)
+--- Thread: Run external commands (/showthread.php?tid=151)



Run external commands - Keybong - 06-11-2019

Hi, I'm new to NaaLaa. I like it alot...

So my question is:

Is there any way to run external programs or shell commands from within NaaLaa?

The program I'm working on would benefit greatly from that capability.


RE: Run external commands - Aurel - 06-12-2019

It seems that the more I use them, the less they do . I get this feeling that there is a mysterious hacker somewhere
that is trying to control the world's computers. I hope that some day someone creates a user friendly computer, so
that I can have my hobby back.


ha ha ...nice thinking Rick
I have same feeling sometimes....


RE: Run external commands - Keybong - 06-12-2019

(06-12-2019, 03:43 PM)Rick3137 Wrote: There are 2 NaaLaa commands that try to do this, but I have tried to use them and can't get anywhere.

 The commands are " System" and " Shell Execute.

 It seems that the more I use them, the less they do . I get this feeling that there is a mysterious hacker somewhere
that is trying to control the world's computers. I hope that some day someone creates a user friendly computer, so
that I can have my hobby back.

LOL. I found out about system early this morning when I got my linux back up and running.
Last night before I posted this, I only knew about 'run'. It would give me errors when I tried to run an external program or shell command.
I want to create a shell/program launcher, so I need to be able to execute things externally, otherwise there would be no point.
Before I saw this response, I was about to write a qb64 program that would encapsulate the naalaa program, intercept a text string from the encapsulated NaaLaa program, run it through a SELECT CASE block with a long list of selector strings, to perform a 'SHELL _DONTWAIT' command (running the desired program/shell script/ external command/etc.). that probably would have done it, but It would have been way sloppier than just using NaaLaa itself.

Thanks for letting me know, saved me a bunch of 2 language nonsense.  Big Grin


RE: Run external commands - Keybong - 06-13-2019

(06-12-2019, 10:18 PM)Keybong Wrote:
(06-12-2019, 03:43 PM)Rick3137 Wrote: There are 2 NaaLaa commands that try to do this, but I have tried to use them and can't get anywhere.

 The commands are " System" and " Shell Execute.

 It seems that the more I use them, the less they do . I get this feeling that there is a mysterious hacker somewhere
that is trying to control the world's computers. I hope that some day someone creates a user friendly computer, so
that I can have my hobby back.

LOL. I found out about system early this morning when I got my linux back up and running.
Last night before I posted this, I only knew about 'run'. It would give me errors when I tried to run an external program or shell command.
I want to create a shell/program launcher, so I need to be able to execute things externally, otherwise there would be no point.
Before I saw this response, I was about to write a qb64 program that would encapsulate the naalaa program, intercept a text string from the encapsulated NaaLaa program, run it through a SELECT CASE block with a long list of selector strings, to perform a 'SHELL _DONTWAIT' command (running the desired program/shell script/ external command/etc.). that probably would have done it, but It would have been way sloppier than just using NaaLaa itself.

Thanks for letting me know, saved me a bunch of 2 language nonsense.  Big Grin

Well it turns out that I couldnt get Shell Execute to work... and system actually opened up the program twice, along with a command prompt window. lol


RE: Run external commands - oneworldrentalca - 11-15-2019

Well, is anyone here to teach me naalaa how it works?

Rent Laptops Toronto


RE: Run external commands - cvirus - 11-15-2019

What do you need to know?


RE: Run external commands - Marcus - 11-17-2019

I shall write some examples soon Smile

In this program, http://www.naalaa.com/community/showthread.php?tid=142 , I use shellexecute.


RE: Run external commands - Marcus - 11-17-2019

'system' is easy to use, but it opens a command prompt whenever you call it:

Code:
system "dir & echo Hello World & pause"

If you want to launch a program it's better to use 'shellexecute'. If the following program is executed from the c:\N6 directory, it will launch the naalaa ide and wait until you close it:

Code:
shellexecute "open", "NED6.exe", "", "", true

If you set the last parameter to false, your program will continue running without waiting for the new instance of the ide to close.

This piece of code let's the user select an exe file to run:

Code:
f$ = openfile("exe");
shellexecute "open", f$, "", "", true

The third parameter can be used for setting the directory where the program you want to execute is located. It's not needed in the example above, since f$ itself will contain the full path. The fourth one is for sending parameters to the program.