Syntax problem on "focus list"
Syntax problem on "focus list"
Whenever I run:
goto "Desktop|"; sortby m, d; sel 1; focus List;
I get the following error:
! Dubious syntax: List
I press continue and the script works normally but since I use this on other directories I would like to avoid the error msg every time.
Pls advise.
goto "Desktop|"; sortby m, d; sel 1; focus List;
I get the following error:
! Dubious syntax: List
I press continue and the script works normally but since I use this on other directories I would like to avoid the error msg every time.
Pls advise.
Re: Syntax problem on "focus list"
Try
goto "Desktop|"; sortby m, d; sel 1; focus "L";
Refer to the "focus" scripting command in Help.Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440
Re: Syntax problem on "focus list"
Thanks! It worked.
I used the code from the Scripting codes in Help. So that was why I couldn't understand why the error. I do have the latest version of XY by the way.
I used the code from the Scripting codes in Help. So that was why I couldn't understand why the error. I do have the latest version of XY by the way.
Re: Syntax problem on "focus list"
You didn't. Hence the error.I used the code from the Scripting codes in Help
One of my scripts helped you out? Please donate via Paypal
Re: Syntax problem on "focus list"
This is the script that is in my Help file:
It ends with which caused the error.
So what am I missing?
Code: Select all
goto "Desktop|"; sortby m, d; sel 1; focus List;
Code: Select all
focus List;
So what am I missing?
Re: Syntax problem on "focus list"
I'm not sure what "my help file" is, but in XYplorer's Help file it states:
focus [control (L|A|T|C|P1|P2|PI|LFB)]
Which means after "focus" you should specify one of those control letters (or letter number combinations), like "L", "A", etc. (not "List"). Even the example states: Code: Select all
focus or focus "L"
Set focus to the List.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440
Re: Syntax problem on "focus list"
Thanks for the data. Just to make it more clear where I got that code from.
It is from the Help menu of XY:
Contents and Index | Scripting |General Command Syntax | Examples
Then it gives two examples the second one is:
It is from the Help menu of XY:
Contents and Index | Scripting |General Command Syntax | Examples
Then it gives two examples the second one is:
Code: Select all
goto "Desktop|"; sortby m, d; sel 1; focus List;
Re: Syntax problem on "focus list"
Okay thanks, that's an error in syntax for "focus".
Don in Help > Contents and Index | Scripting |General Command Syntax | Examples, the following is the second example. The syntax for focus is incorrect (e.g., dubious syntax error). It should be
Don in Help > Contents and Index | Scripting |General Command Syntax | Examples, the following is the second example. The syntax for focus is incorrect (e.g., dubious syntax error). It should be
focus "L"
. Thanks.Code: Select all
goto "Desktop|"; sortby m, d; sel 1; focus List;
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Syntax problem on "focus list"
Thanks.
focus "List";
works as well, but according to the docs it should be focus "L";
indeed.FAQ | XY News RSS | XY Twitter
-
- Posts: 1
- Joined: 02 Aug 2022 17:05
Re: Syntax problem on "focus list"
I'm not sure what "my help file" is, but in XYplorer's Help file it states: focus [control (L|A|T|C|P1|P2|PI|LFB)] Which means after "focus" you should specify one of those control letters (or letter number combinations, Even the example states.
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Syntax problem on "focus list"
The wrong
focus List;
example is found in the current help file. It will not be there in the next one.FAQ | XY News RSS | XY Twitter
Re: Syntax problem on "focus list"
Hi Don, was that some kind of fake post or bot that you just answered. I say that because that post is a duplicate of my post (i.e., the first paragraph) above here viewtopic.php?p=201180#p201180.goldleiazale wrote: ↑02 Aug 2022 17:07 I'm not sure what "my help file" is, but in XYplorer's Help file it states: focus [control (L|A|T|C|P1|P2|PI|LFB)] Which means after "focus" you should specify one of those control letters (or letter number combinations, Even the example states.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Syntax problem on "focus list"
Oh, shit. Should have made the Turing test.
FAQ | XY News RSS | XY Twitter