woah! you made it here! alright let's start.
as you've learned in the basics, Import-Module
is the default powershell cmdlet to import functions and variables from other scripts, to that in dotlang, simply:
import ".\anotherfile.ps1";
# or,
import(".\anotherfile.ps1");
simple ain't it?
yeah, we have this in dotlang :)
$key = dotaes; # you can just use `$key = "YOUR_KEY_HERE"`
$key; # optional, displays encrypting key
$unencryptedString = "blahblahblah";
# Encrypting
$encryptedString = EncryptData $key $unencryptedString;
# Decrypting
$backToPlainText = DecryptData $key $encryptedString;
output:
for short, async
!
very easy, To make an async job:
$jobID = dotasync("Long_Running_Command");
function isCompleted {
if (dotasync_check($jobID)) {
printTxt("Job Finished!");
printTxt("Job Returned:");
dotasync_get($jobID);
} else {
isCompleted
}
}
isCompleted
that was pretty advanced, ain't it?
yeah.. it doesn't support dotlang commands, only powershell (sorry)..
dotremote "ComputerName or Address" "Powershell command";
MonitorProcess "ProccessName" {
# action on proccess start goes here
};
Invoke-InContext Admin "Write-Host hii" # run command as admin in another window
Invoke-InContext User "Write-Host hii" # run command as a user (not admin)
yep. and it's easy.
dotschedule "Command" "Time";
$currentOS = Get-OS;
printTxt("You're running a $currentOS machine!"); # 'windows' for Windows, 'mac' for MacOS, 'gnu' for GNU/Linux
hello TUIs dev. it's now MUCH easier to make TUIs with dotlang
! here's an example:
$inp = dotui "What do you use?" "Windows","GNU/Linux","MacOS";
printTxt("You've choosen the input $($inp+1)");
Usage: dotui "Title" "Input 0","Input 1","Input 3", etc...
To sort arrays in dotlang,
$array = "[1, 6, 7, 2, 3]" # in JSON format
# in v2
$sortedArray = dotsort($array);
# in v3
$sortedArray = sort($array);
$sortedArray = @(1,2,3,6,7) cool?
$key = dotkey;
printTxt 'You Pressed "$key"';
Output: You Pressed "w"
dotsharp is used to integrate C# with dotlang. to add a C# script:
dotsharp_add @"
// your C# script
"@
and to use it:
dotsharp("CLASS.FUNCTION(PARAMS,GOES,HERE)");