Fandom

Mecca Programming

Tutorials

6pages on
this wiki
Add New Page
Comments0 Share


Nice and simple stuff here!
Please note, when you have a string, it's still displayed like %this%!

To display text, you type;
text.show; (text and strings) This is the equivalent of 'echo blah'
To save this text to a file, you add
text.save c:Text.txt
to the end of it; Looking like this:
text.show; text.save; c:Text.txt

To set a string, you type;
string (stringname)=(string)

Here are file option codes to type in: File.copy; (filefolderlocation) (folderlocation) - Copy a file or folder File.move; (filefolderlocation) (folderlocation) - Move a file or folder File.del; (filefolderlocation) - Delete a file or folder File.read; (filelocation) - Read the contents of a file File.open; (filefolderlocation) - Open a file or folder File.print; (filelocation) - Print a file

To allow custom input, type;
text.input; (stringname)=(somestarttext)

To add a pause, type;
Time.pause

To add a location in you're code (like :here), Type;
Loc.set; (name)
To go to it, type;
Loc.goto; (name)

To make a new folder, type;
Dir.new; (name)

To call a batch file, type;
Batch.load; (File.bat)

Now, the main thing, the IF statement

Available Operators; == - Equals =x - Not equal > - More than < - Less than >= - Equal or more than <= - Equal or less than

String's can be user input's or set strings
To add an if statement, type; There must be spaces where I have put them!

if (%string1%(Or text)(Operator)%string2%(Or text)) {
//do stuff here!
} (Not required from here!) else {
//do more stuff here!
}

To change the window name, type;
Window.title; (title)

To remove parameters, type;
Window.hide;

To exit the program, type;
Window.exit;

To clear the screen, type;
Window.clear

To start another program, type;
Other.start; (Location)

To change the colour of the window, type;
Available colours: black blue green aqua red purple yellow white

Window.colour;Colour.(colour);Colour.(colour);

To use robocopy, type;
Dir.rcopy; (atribs here)

To replace a file, type;
File.replace; (file1) (file2)

To rename a file, type;
File.rename; (file) (newname)

To check a directory, type;
Other.cdir; (Folder)

To kill a task, type;
Other.tkill; (task)
To list all task's type;
Other.tlist;

To remove a directory, type;
Dir.rdir; (folder)

To do the tree command, type;
Dir.tree; (atribs here)

To list user's on the computer, type;
Net.accounts;
To get info for one account, type;
Net.account; (Username) (*(Add this to change user's password))
To see all incoming and outgoing connections(IPS), type;
Net.incoming;

Sample programs!Edit

Normal batch;Edit

@echo off
title Hello world!
echo Hello world!
set /p string=1 or 0:
if %var%==1 echo It's 1!
if %var%==0 echo It's 0!
pause
exit

Mecca batch;Edit

Window.hide;
Window.title; Hello World!
text.show; Hello world!
text.input; string=1 or 0:
if (%var% == 1) {
text.show; It's 1!
} if (%var%==0) {
text.show; It's 0!
} Time.pause
Window.exit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.