- + Scripting: Added a bit of conditional logic in a form of "ternary conditionals" as used in various programming languages (e.g. PHP). The logic (this structure is not yet part of XY!) is this:
if (condition) {
variable = value-if-true;
} else {
variable = value-if-false;
}
As ternary conditional the same can be written like follows and is now available in XY scripting:
variable = (condition) ? value-if-true : value-if-false;
The parentheses and the blanks are optional, so these are identical:
variable = (condition) ? value-if-true : value-if-false;
variable = (condition)? value-if-true: value-if-false;
variable = condition?value-if-true:value-if-false;
The part "condition" has the form
"a" operator "b"
where "a" and "b" are whole strings (without any concatenators), and "operator" can be one of the following:
== Equal
!= Not Equal
< Less than
> Greater than
<= Less than or Equal to
>= Greater than or Equal to
(none) True if expression is not 0 and not ""
The parts "value-if-true" and "value-if-false" must be whole
strings (without any concatenators).
Examples:
::$a = <date>>= "12"? "afternoon": "morning";
msg "Good $a!";
::$a = ( == "12-24")? "": "not ";
msg "It's $a"."X-mas!";
::$a=1;$b=2;$c=3;$d=4;$e=$a==$b?$c:$d; msg $e;
Now the best part: You can employ ternary conditionals in any argument or part of argument!
Examples:
::msg "Good ".<date> >= "12"? "afternoon": "morning"."!";
::msg "Good ".(<date> >= "12")? "afternoon": "morning"."!";
::msg "It's ".<date> == "12-24"? "": "not"." X-mas!";
::getinfo $a, "CountSelected"; $r=$a?"$a":"no";
msg "There " . $a!=1?"are":"is" . " $r selection" .
$a!=1?"s":"" . "."; - ! FVS: As a side-effect of a recent fix in v7.60.0005 the list styles would get lost when switching between special folders (MyComputer, Nethood) and normal folders on a fresh installation. Fixed.
- ! SC download: Extension .htm was appended to all downloaded files that were not *.htm. Stupid bug. Fixed: Now .htm is appended only to files that are HTML but lack the extension.
::download "http://www.xyplorer.com/xyfc/viewforum.php?f=2"
= creates local copy "viewforum.php_f=2.htm" (where _ is your
replacement char for illegal characters). - + Configuration | Color Filters: To reset textcolor or backcolor to the default value, simply hold CTRL when you click the Text Color resp. Back Color button.
- ! Monospace Fonts: Possible issues (wrong size) due to misinterpreted number formating when user switches locale. Fixed. Your monospace font size settings will be reset to factory defaults due to the fix.