[SOLVED] Color filter by custom columns -- is this possible?
-
sj515064
- Posts: 51
- Joined: 21 Feb 2019 06:14
[SOLVED] Color filter by custom columns -- is this possible?
I have a custom column named "SVN status", which shows enumerations like "normal", "modified", "added", ..., etc. for each file.
I would like to have different colors for files with different values in the custom column "SVN status". For example, if a file is "modified", it is red. If it is "normal", it is green.
Is this possible?
I would like to have different colors for files with different values in the custom column "SVN status". For example, if a file is "modified", it is red. If it is "normal", it is green.
Is this possible?
Last edited by sj515064 on 08 Mar 2019 15:52, edited 1 time in total.
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Color filter by custom columns -- is this possible?
Only if the entries in the custom column are representing tags.
One of my scripts helped you out? Please donate via Paypal
-
sj515064
- Posts: 51
- Joined: 21 Feb 2019 06:14
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Color filter by custom columns -- is this possible?
Be more specific?I found the return of SC "runret()" different from the one returned directly by CMD, especially when the return is multi-line
One of my scripts helped you out? Please donate via Paypal
-
sj515064
- Posts: 51
- Joined: 21 Feb 2019 06:14
Re: Color filter by custom columns -- is this possible?
It's difficult for you to reproduce the result
I have attached the results below. Using a tool for text comparison it's easy to see the difference:
https://sjtueducn-my.sharepoint.com/:u: ... A?e=aznog1
This occurs mostly when there are CJK characters and multiple lines in the return.
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Color filter by custom columns -- is this possible?
And the runret() part of the script looks like?...
One of my scripts helped you out? Please donate via Paypal
-
sj515064
- Posts: 51
- Joined: 21 Feb 2019 06:14
Re: Color filter by custom columns -- is this possible?
It's like this:
Code: Select all
$P_SVN_Result = runret("svn status -v");
//for debug
writefile("return_by_runret.txt", $P_SVN_Result);-
sj515064
- Posts: 51
- Joined: 21 Feb 2019 06:14
Re: Color filter by custom columns -- is this possible?
Just for reference for those who also come across the problem (return by runret() is not the same as that of CMD):
Root of the problem is difficult to locate. However, I did find a workaround:
1. Replace with
(if "<curpath>" is not necessary simply remove it)
2. Read the output.txt in the temp folder:
3. Use $Result as you wish.
Root of the problem is difficult to locate. However, I did find a workaround:
1. Replace
Code: Select all
runret(command);Code: Select all
run "cmd /c command ""<curpath>"" > ""<xydata>\temp\output.txt""", ,2,0;2. Read the output.txt in the temp folder:
Code: Select all
$Result = readfile("<xydata>\temp\output.txt");
Last edited by sj515064 on 08 Mar 2019 13:44, edited 3 times in total.
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Color filter by custom columns -- is this possible?
run "cmd /c command ""<curpath>"" > <xydata>\temp\output.txt", ,2,0;You'll get into trouble if <xydata> is a path that contains a space!
One of my scripts helped you out? Please donate via Paypal
-
sj515064
- Posts: 51
- Joined: 21 Feb 2019 06:14
Re: Color filter by custom columns -- is this possible?
Thanks for the alert
I'm a newbie in XY scripting. I think adding or removing some quotation marks will help to avoid the problem.
But I don't know how to do it
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Color filter by custom columns -- is this possible?
And looking at how it is done for <curpath> does not help? oO
One of my scripts helped you out? Please donate via Paypal
-
sj515064
- Posts: 51
- Joined: 21 Feb 2019 06:14
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Color filter by custom columns -- is this possible?
You need to quote the full path, not only a part of it...
One of my scripts helped you out? Please donate via Paypal
-
sj515064
- Posts: 51
- Joined: 21 Feb 2019 06:14
Re: Color filter by custom columns -- is this possible?
I finally figure it out:
It should be
Code: Select all
run "cmd /c command ""<curpath>"" > ""<xydata>\temp\output.txt", ,2,0;Code: Select all
run "cmd /c command ""<curpath>"" > ""<xydata>""\temp\output.txt", ,2,0;-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Color filter by custom columns -- is this possible?
run "cmd /c command ""<curpath>"" > ""<xydata>\temp\output.txt""", ,2,0;One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club