@@ -1400,7 +1400,7 @@ static int getfontfamilies (lua_State *L)
1400
1400
1401
1401
Example:
1402
1402
1403
- utils.send_to_front ("Crimson Editor")
1403
+ utils.sendtofront ("Crimson Editor")
1404
1404
1405
1405
*/
1406
1406
@@ -1412,77 +1412,74 @@ static int send_to_front (lua_State *L)
1412
1412
1413
1413
/* Execute an operating-system command:
1414
1414
1415
- windows_utils.shell_execute (filename, params, defdir, operation, show_command)
1415
+ utils.shellexecute (filename, params, defdir, operation, show_command)
1416
1416
1417
- Only the first argument (filename) is required, the rest are optional.
1417
+ Only the first argument (filename) is required, the rest are optional.
1418
1418
1419
- filename: The file to open or print or the folder to open or explore.
1420
- The function can open an executable file or a document file.
1421
- The function can print a document file.
1419
+ filename: The file to open or print or the folder to open or explore.
1420
+ The function can open an executable file or a document file.
1421
+ The function can print a document file.
1422
1422
1423
- params: A string that specifies the parameters to be passed to the application.
1424
- If filename specifies a document file, params should be nil or "".
1423
+ params: A string that specifies the parameters to be passed to the application.
1424
+ If filename specifies a document file, params should be nil or "".
1425
1425
1426
- defdir: A string that specifies the default directory.
1427
-
1428
- operation: The following operation strings are valid:
1429
- "open": The function opens the file specified by the filename parameter.
1430
- The file can be an executable file or a document file. It can also be a folder.
1431
- "print": The function prints the file specified by filename.
1432
- The file should be a document file.
1433
- If the file is an executable file, the function opens the file,
1434
- as if "open" had been specified.
1435
- "explore": The function explores the folder specified by filename.
1426
+ defdir: A string that specifies the default directory.
1427
+
1428
+ operation: The following operation strings are valid:
1429
+ "open": The function opens the file specified by the filename parameter.
1430
+ The file can be an executable file or a document file. It can also be a folder.
1431
+ "print": The function prints the file specified by filename.
1432
+ The file should be a document file.
1433
+ If the file is an executable file, the function opens the file,
1434
+ as if "open" had been specified.
1435
+ "explore": The function explores the folder specified by filename.
1436
1436
1437
- This parameter can be nil or "".
1438
- In that case, the function opens the file specified by filename.
1437
+ This parameter can be nil or "".
1438
+ In that case, the function opens the file specified by filename.
1439
1439
1440
- show_command: If filename specifies an executable file, show_command specifies how the
1441
- application is to be shown when it is opened.
1440
+ show_command: If filename specifies an executable file, show_command specifies
1441
+ how the application is to be shown when it is opened.
1442
1442
1443
- This parameter can be nil in which case it defaults to 1 - the recommended default.
1444
-
1445
- This parameter can be one of the following values:
1443
+ This parameter can be nil in which case it defaults to 1 - the recommended default.
1444
+
1445
+ This parameter can be one of the following values:
1446
1446
1447
- 0: Hides the window and activates another window.
1448
- 1: Activates and displays a window.
1449
- If the window is minimized or maximized, Windows restores it to
1450
- its original size and position.
1451
- An application should specify this flag when displaying the window for the first time.
1452
- 2: Activates the window and displays it as a minimized window.
1453
- 3: Activates the window and displays it as a maximized window.
1454
- 4: Displays a window in its most recent size and position.
1455
- The active window remains active.
1456
- 5: Activates the window and displays it in its current size and position.
1457
- 6: Minimizes the specified window and activates the next top-level window in the z-order.
1458
- 7: Displays the window as a minimized window.
1459
- The active window remains active.
1460
- 8: Displays the window in its current state.
1461
- The active window remains active.
1462
- 9: Activates and displays the window.
1463
- If the window is minimized or maximized, Windows restores it to its original
1464
- size and position.
1465
- An application should specify this flag when restoring a minimized window.
1466
- 10: Sets the show state based on the SW_ flag specified in the STARTUPINFO structure
1467
- passed to theCreateProcess function by the program that started the application.
1468
- An application should call ShowWindow with this flag to set the initial show
1469
- state of its main window.
1470
-
1471
-
1472
- If sucessful, the function returns true.
1473
- If not, it returns nil followed by an error message. You could use "assert" to test for failure.
1474
-
1475
- Examples:
1476
-
1477
- assert (windows_utils.shell_execute ("c:\\mushclient\\worlds\\SMAUG.MCL")) -- document
1478
-
1479
- assert (windows_utils.shell_execute ("http://www.gammon.com.au/")) -- web page
1480
-
1481
- assert (windows_utils.shell_execute ("mailto:someone@somewhere.com")) -- open mail client
1482
-
1483
- assert (windows_utils.shell_execute ("c:\\", nil, nil, "explore")) -- explore disk
1484
-
1485
- assert (windows_utils.shell_execute ("c:\\readme.txt", nil, nil, "print")) -- print a file
1447
+ 0: Hides the window and activates another window.
1448
+ 1: Activates and displays a window.
1449
+ If the window is minimized or maximized, Windows restores it to
1450
+ its original size and position.
1451
+ An application should specify this flag when displaying the window for the first time.
1452
+ 2: Activates the window and displays it as a minimized window.
1453
+ 3: Activates the window and displays it as a maximized window.
1454
+ 4: Displays a window in its most recent size and position.
1455
+ The active window remains active.
1456
+ 5: Activates the window and displays it in its current size and position.
1457
+ 6: Minimizes the specified window and activates the next top-level window in the z-order.
1458
+ 7: Displays the window as a minimized window.
1459
+ The active window remains active.
1460
+ 8: Displays the window in its current state.
1461
+ The active window remains active.
1462
+ 9: Activates and displays the window.
1463
+ If the window is minimized or maximized, Windows restores it to its original
1464
+ size and position.
1465
+ An application should specify this flag when restoring a minimized window.
1466
+ 10: Sets the show state based on the SW_ flag specified in the STARTUPINFO structure
1467
+ passed to theCreateProcess function by the program that started the application.
1468
+ An application should call ShowWindow with this flag to set the initial show
1469
+ state of its main window.
1470
+
1471
+
1472
+ If sucessful, the function returns true.
1473
+
1474
+ If not, it returns nil followed by an error message. You could use "assert" to test for failure.
1475
+
1476
+ Examples:
1477
+
1478
+ assert (utils.shellexecute ("c:/mushclient/worlds/SMAUG.MCL"))-- document
1479
+ assert (utils.shellexecute ("http://www.gammon.com.au/")) -- web page
1480
+ assert (utils.shellexecute ("mailto:someone@somewhere.com")) -- open mail client
1481
+ assert (utils.shellexecute ("c:/", nil, nil, "explore")) -- explore disk
1482
+ assert (utils.shellexecute ("c:/readme.txt", nil, nil, "print")) -- print a file
1486
1483
1487
1484
*/
1488
1485
0 commit comments