Search found 21 matches

by zhaowu
13 Jan 2019 03:47
Forum: Bug Reports
Topic: '<xyicons>' is interpolated within single-quotes
Replies: 8
Views: 318

Re: '<xyicons>' is interpolated within single-quotes

admin wrote:
12 Jan 2019 10:40
I see. So, since v19.50.0116 it works again, right?
Yes, it is working now. Thanks!
by zhaowu
12 Jan 2019 06:00
Forum: Bug Reports
Topic: '<xyicons>' is interpolated within single-quotes
Replies: 8
Views: 318

Re: '<xyicons>' is interpolated within single-quotes

Damn, I just decided the other way. The correct code for double-resolving should be this: $var = '<xyicons>'; msg eval($var); The current behavior is simply wrong. :| This is how I found this problem. The code was intended to replace copy path with shorter and portable path when I add custom icons ...
by zhaowu
06 Jan 2019 06:45
Forum: Bug Reports
Topic: '<xyicons>' is interpolated within single-quotes
Replies: 8
Views: 318

'<xyicons>' is interpolated within single-quotes

Code: Select all

    $var = '<xyicons>';
    msg $var;
The $var is interpolated and the msg is something like C:\xxx\XYplorer\Data\Icons
by zhaowu
10 Nov 2016 10:56
Forum: Bug Reports
Topic: writefile() default mode bug: text is unexpectedly chopped
Replies: 14
Views: 1004

Re: writefile() default mode bug: text is unexpectedly chopp

This should be the Raw View of the created file: 00000000: E7 BA BD E7 BA A6 E7 81 BE E6 98 9F 20 54 68 65 ; 纽约灾星 The 00000010: 20 4A 69 6E 78 3A 20 54 68 65 20 4C 69 66 65 20 ; Jinx: The Life 00000020: 61 6E 64 20 44 65 61 74 68 73 20 6F 66 20 52 6F ; and Deaths of Ro 00000030: 62 65 72 74...
by zhaowu
10 Nov 2016 09:14
Forum: Bug Reports
Topic: writefile() default mode bug: text is unexpectedly chopped
Replies: 14
Views: 1004

Re: writefile() default mode bug: text is unexpectedly chopp

SC writefile does not support utf-8 conversion. You can use utf8encode() on the string to convert it before passing it to writefile. $text = "纽约灾星 The Jinx: The Life and Deaths of Robert Durst (2015)"; writefile("<xydata>\Log\XYplorer.log", utf8encode($text.<crlf>), 'a', 't'); This method does not ...
by zhaowu
10 Nov 2016 06:06
Forum: Bug Reports
Topic: writefile() default mode bug: text is unexpectedly chopped
Replies: 14
Views: 1004

Re: writefile() default mode bug: text is unexpectedly chopp

v17.30.0102 - 2016-11-09 20:53 ! SC writefile: On DBCS locales (using double-byte character sets: Chinese, Japanese, Korean) text with Unicode characters would be cropped at the end when you passed 't' as mode parameter. Fixed. Thanks for the fix. However, this update writes file as utf-16le which ...
by zhaowu
09 Nov 2016 14:02
Forum: Bug Reports
Topic: writefile() default mode bug: text is unexpectedly chopped
Replies: 14
Views: 1004

Re: writefile() default mode bug: text is unexpectedly chopp

admin wrote:Interesting!

Code: Select all

echo isunicode("纽约灾星 The Jinx: The Life and Deaths of Robert Durst (2015)");
1

Code: Select all

echo isunicode("纽约灾星 The Jinx: The Life and Deaths of Robert Durst (2015)", 1);
0
by zhaowu
08 Nov 2016 03:07
Forum: Bug Reports
Topic: writefile() default mode bug: text is unexpectedly chopped
Replies: 14
Views: 1004

Re: writefile() default mode bug: text is unexpectedly chopp

Same code works well when writefile with mode `tu`.
by zhaowu
08 Nov 2016 03:05
Forum: Bug Reports
Topic: writefile() default mode bug: text is unexpectedly chopped
Replies: 14
Views: 1004

writefile() default mode bug: text is unexpectedly chopped

Example: ( Chinese is included in the data )

Code: Select all

"Main"
	$text = "纽约灾星 The Jinx: The Life and Deaths of Robert Durst (2015)";
	writefile("<xydata>\Log\XYplorer.log", $text.<crlf>, 'a', 't');
The result text is unexpectedly chopped:

Code: Select all

纽约灾星 The Jinx: The Life and Deaths of Robert Durst (201
by zhaowu
06 Nov 2016 22:53
Forum: Script Exchange
Topic: User Functions Exchange
Replies: 99
Views: 32891

Re: User Functions Exchange

Wow, brilliant idea of using eval()! :appl: You pass an expression as argument! Never seen this in my life. :shock: However, I think the code you posted does not work. You reset $list to nothing before it is processed by foreach. I changed the code by adding a separate variable $listout and now it ...
by zhaowu
05 Nov 2016 15:21
Forum: Script Exchange
Topic: User Functions Exchange
Replies: 99
Views: 32891

Re: User Functions Exchange

Like Array.filter() in many languages which creates a new array with all elements that pass the test. Example: Remove non-existent recent locations from list echo listFilter(get("list_recentlocations"), 'exists("{@Item}")', <crlf>) /** * List Filter * * * @param {list} $list list of tokens * @param ...
by zhaowu
02 Nov 2016 16:17
Forum: Wishes
Topic: Add sub-menu support for scripts
Replies: 76
Views: 6552

Re: Add sub-menu support for scripts

Suggestion: relative level "Caption|Icon|State|[+|-]Level : Label" Script Example: /* global menu level for this script */ "C:" "Go to C:\|||+1" goto "C:\"; "%winsysdir%|||+1" goto "%winsysdir%";selectitems "calc.exe"; "D:" "Go to D:\|||+1" goto "D:\"; With this relative level, it is easy to load s...
by zhaowu
02 Nov 2016 12:38
Forum: Wishes
Topic: Add sub-menu support for scripts
Replies: 76
Views: 6552

Re: Add sub-menu support for scripts

v17.30.0001 - 2016-11-02 11:29
+++ Scripting: Now Multi-Scripts support nesting.
Thanks for the update! :tup:

Wish: load submenu from other script. For example:

Code: Select all

"<load otherscript.xys>|icon|state|LEVEL : label"
This will load "otherscript.xys" and put menus as "LEVEL + 1"
by zhaowu
02 Nov 2016 12:11
Forum: Wishes
Topic: Scripting: numbered arguments -> named arguments
Replies: 3
Views: 478

Scripting: numbered arguments -> named arguments

v17.30.0001 - 2016-11-02 11:29 +++ Scripting: Now numbered arguments are supported. Concerning numbered arguments, named arguments is a better choice for code readability. For example: # Python def fancyPrint(message, color='black', bold=True, underline=True): # ... implementation ... fancyPrint('H...
by zhaowu
31 Oct 2016 01:06
Forum: Wishes
Topic: Input Dialogue with Tips/Info Button
Replies: 5
Views: 819

Re: Input Dialogue with Tips/Info Button

Another issue/wish is the cursor location: it should be in the end...

Image