Change color based on content of folder?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
mrbosco
Posts: 125
Joined: 03 Sep 2011 09:40

Re: Change color based on content of folder?

Post by mrbosco »

I wanted an indication when the script was running so I added
msg "Script Started";
to the very beginning but instead of popping up a dialog and then running the rest of the script it just shows the whole script and doesn't actually do anything.

I'm a newbie but I thought this should be pretty easy to do.
Any ideas what I'm doing wrong?

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Change color based on content of folder?

Post by highend »

You didn't indent your added line correctly (probably without any indentation)...
One of my scripts helped you out? Please donate via Paypal

mrbosco
Posts: 125
Joined: 03 Sep 2011 09:40

Re: Change color based on content of folder?

Post by mrbosco »

The scripting language relies on indentation?
How should the first line be indented?

mrbosco
Posts: 125
Joined: 03 Sep 2011 09:40

Re: Change color based on content of folder?

Post by mrbosco »

In a multi-line script all lines apart from the first line have to be indented by at least one space.

Sorry, it never occurred to me that there was an indentation rule.

Is there a way to send a text string to the title bar or caption w/o opening up a text box?

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Change color based on content of folder?

Post by highend »

Is there a way to send a text string to the title bar or caption w/o opening up a text box?
What? You want to modify XY's window title on the fly with an XY script?
One of my scripts helped you out? Please donate via Paypal

mrbosco
Posts: 125
Joined: 03 Sep 2011 09:40

Re: Change color based on content of folder?

Post by mrbosco »

If it's possible, or some other way to display something without requiring to close a msgbox.

mrbosco
Posts: 125
Joined: 03 Sep 2011 09:40

Re: Change color based on content of folder?

Post by mrbosco »

I guess the status command is good enough. Thanks for your help.

PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Change color based on content of folder?

Post by PeterH »

Code: Select all

   status "text";
:?:

edit: 1 minute late :mrgreen:
Win11 Pro 223H2 Gerrman

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Change color based on content of folder?

Post by highend »

Or if it has to be the title bar...

I've attached a small tool.

It expects two parameters
01. XY's hwnd
02. The new text of the window title

If you don't supply both, it won't do anything!

E.g. invoked via XY scripting:

Code: Select all

    $exe = "D:\XY_Window title changer.exe";
    run """$exe"" ""<hwnd>"" ""The new title of the window""", "%TEMP%";
<hwnd> already contains XY's window handle so you'd only need to change the text for the window...
Attachments
XY_Window title changer.zip
(3.46 KiB) Downloaded 80 times
One of my scripts helped you out? Please donate via Paypal

Post Reply