var ini = new TIniFile(Script.GetPath + "myini.ini");
ini.WriteString("General Settings", "Title", "Lorem Ipsum");
delete ini;
function OnChange(sender) {
Script.Message("Changed");
}
function OnClick(sender) {
Script.Message("Click");
}
var cmbLength = new TComboBox(f);
cmbLength.OnClick = &OnClick;
cmbLength.OnChange = &OnChange;
var str = "abc 3px hh 4px";
regEx = RegexMatchAll(str, "px", true, unitMatch, unitPosition); // regEx is -1, length = 2
regEx = RegexMatchAll(str, "xx", true, unitMatch, unitPosition); // regEx is 0
regEx = RegexMatchAll(str, "(\d*\.?\d*)px", true, unitMatch, unitPosition); // regEx is -1, length = 0
var msg = unitMatch[1];
alert(msg);
var selection = Editor.SelText; // obtain current text selection
var regEx = RegexMatchAll(selection, "(\d*\.?\d*)px", true, unitMatch, unitPosition);
var len = Length(unitMatch);
Script.Message("Length: " + _t(len) );
for (var j = 1; j <= len; j++) {
msg = unitMatch[j]; // Error: Could not convert variant of type (Null) into type (Integer)
Script.Message("Match: " + _t(msg) );
}
Return to Plugins for HTMLPad / Rapid CSS / Rapid PHP / WeBuilder
Users browsing this forum: No registered users and 1 guest