Zum Hauptinhalt springen

Spickzettel

// Kommentare: Zeilenkommentare wie dieser oder /* Blockkommentare */
count = 0; // eine Variable entsteht durch Zuweisung
name = "Notepad"; // Text (nur doppelte Anführungszeichen)
ratio = 0.5; // Real
mask = 0x10 | 0x01; // Hex-Literale + bitweise Operatoren
on = true; // Bool
w = WindowGetActive(); // Window-Handle, von einer integrierten Funktion zurückgegeben

if (WindowContainsTitle(w, name)) {
WindowMaximize(w);
} else if (count > 3) {
UtilityPrint("many");
} else {
UtilityPrint("few");
}

for (i = 0; i < 5; i = i + 1) { // die einzige Schleifenform
count = count + i;
}

UtilityPrint(StringFormat("count={0}, ratio={1}", count, ratio)); // count=10, ratio=0.500000
KeyboardPressKey(VirtualKey.MediaPlayPause); // benannte Konstante