The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.0.13 (Linux)
File Line Function
/global.php 783 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.0.13 (Linux)
File Line Function
/global.php 783 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(844) : eval()'d code PHP 8.0.13 (Linux)
File Line Function
/global.php(844) : eval()'d code 34 errorHandler->error
/global.php 844 eval
/showthread.php 28 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.0.13 (Linux)
File Line Function
/global.php 909 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5116 - File: inc/functions.php PHP 8.0.13 (Linux)
File Line Function
/inc/functions.php 5116 errorHandler->error
/global.php 909 build_theme_select
/showthread.php 28 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7277 - File: inc/functions.php PHP 8.0.13 (Linux)
File Line Function
/inc/functions.php 7277 errorHandler->error
/inc/functions.php 5136 is_member
/global.php 909 build_theme_select
/showthread.php 28 require_once
Warning [2] Undefined array key 1 - Line: 1440 - File: inc/functions.php PHP 8.0.13 (Linux)
File Line Function
/inc/functions.php 1440 errorHandler->error
/inc/functions.php 1405 fetch_forum_permissions
/inc/functions.php 2934 forum_permissions
/showthread.php 645 build_forum_jump
Warning [2] Undefined array key "mybb" - Line: 1977 - File: inc/functions.php PHP 8.0.13 (Linux)
File Line Function
/inc/functions.php 1977 errorHandler->error
/inc/functions_indicators.php 41 my_set_array_cookie
/showthread.php 653 mark_thread_read
Warning [2] Undefined property: MyLanguage::$ratings_update_error - Line: 5 - File: showthread.php(756) : eval()'d code PHP 8.0.13 (Linux)
File Line Function
/showthread.php(756) : eval()'d code 5 errorHandler->error
/showthread.php 756 eval
Warning [2] Undefined variable $postsdone - Line: 891 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 891 errorHandler->error
Warning [2] Trying to access array offset on value of type null - Line: 891 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 891 errorHandler->error
Warning [2] Undefined array key 796 - Line: 891 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 891 errorHandler->error
Warning [2] Undefined array key 798 - Line: 891 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 891 errorHandler->error
Warning [2] Undefined array key 800 - Line: 891 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 891 errorHandler->error
Warning [2] Undefined array key 1126 - Line: 891 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 891 errorHandler->error
Warning [2] Undefined array key 1127 - Line: 891 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 891 errorHandler->error
Warning [2] Undefined array key 1128 - Line: 891 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 891 errorHandler->error
Warning [2] Undefined array key 1129 - Line: 891 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 891 errorHandler->error
Warning [2] Undefined array key 796 - Line: 1604 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 1604 errorHandler->error
/showthread.php 1606 buildtree
/showthread.php 903 buildtree
Warning [2] Undefined array key 1126 - Line: 1604 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 1604 errorHandler->error
/showthread.php 1606 buildtree
/showthread.php 903 buildtree
Warning [2] Undefined array key 1127 - Line: 1604 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 1604 errorHandler->error
/showthread.php 1606 buildtree
/showthread.php 903 buildtree
Warning [2] Undefined array key 1128 - Line: 1604 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 1604 errorHandler->error
/showthread.php 1606 buildtree
/showthread.php 903 buildtree
Warning [2] Undefined array key 1129 - Line: 1604 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 1604 errorHandler->error
/showthread.php 1606 buildtree
/showthread.php 903 buildtree
Warning [2] Undefined array key "additionalgroups" - Line: 7277 - File: inc/functions.php PHP 8.0.13 (Linux)
File Line Function
/inc/functions.php 7277 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 904 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.0.13 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 904 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 662 - File: inc/functions_post.php PHP 8.0.13 (Linux)
File Line Function
/inc/functions_post.php 662 errorHandler->error
/showthread.php 904 build_postbit
Warning [2] Undefined array key "showimages" - Line: 743 - File: inc/functions_post.php PHP 8.0.13 (Linux)
File Line Function
/inc/functions_post.php 743 errorHandler->error
/showthread.php 904 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 748 - File: inc/functions_post.php PHP 8.0.13 (Linux)
File Line Function
/inc/functions_post.php 748 errorHandler->error
/showthread.php 904 build_postbit
Warning [2] Undefined array key "invisible" - Line: 1534 - File: showthread.php PHP 8.0.13 (Linux)
File Line Function
/showthread.php 1534 errorHandler->error
Warning [2] Undefined variable $threadnotesbox - Line: 30 - File: showthread.php(1561) : eval()'d code PHP 8.0.13 (Linux)
File Line Function
/showthread.php(1561) : eval()'d code 30 errorHandler->error
/showthread.php 1561 eval
Warning [2] Undefined variable $multipage - Line: 33 - File: showthread.php(1561) : eval()'d code PHP 8.0.13 (Linux)
File Line Function
/showthread.php(1561) : eval()'d code 33 errorHandler->error
/showthread.php 1561 eval
Warning [2] Undefined variable $multipage - Line: 65 - File: showthread.php(1561) : eval()'d code PHP 8.0.13 (Linux)
File Line Function
/showthread.php(1561) : eval()'d code 65 errorHandler->error
/showthread.php 1561 eval
Warning [2] Undefined variable $addremovesubscription - Line: 79 - File: showthread.php(1561) : eval()'d code PHP 8.0.13 (Linux)
File Line Function
/showthread.php(1561) : eval()'d code 79 errorHandler->error
/showthread.php 1561 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Run external commands
#8
'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.
Reply


Messages In This Thread
Run external commands - by Keybong - 06-11-2019, 10:28 PM
RE: Run external commands - by Aurel - 06-12-2019, 06:35 PM
RE: Run external commands - by oneworldrentalca - 11-15-2019, 01:37 PM
RE: Run external commands - by cvirus - 11-15-2019, 02:16 PM
RE: Run external commands - by Marcus - 11-17-2019, 03:37 PM
RE: Run external commands - by Marcus - 11-17-2019, 05:20 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)