XFILES always opens on :MAIN
-
- Posts: 31
- Joined: Thu Feb 22, 2024 12:58 pm
- Location: Banbury=ish UK
XFILES always opens on :MAIN
Im using XFILES to view and edit a database and its working great .But everytime I access XFILES the default is :MAIN and I have to re-open the File im working on .is there a way to either change the default or open XFILES with a shortcut ??
-
- Posts: 77
- Joined: Tue Jan 03, 2023 10:03 pm
Re: XFILES always opens on :MAIN
No way to change the default, but you can add a file shortcut directly to top menu, for example you have a Xfile DB called “Addr” you can insert in main menu by pressing mode, type ADDR, enter, select Files option, now it will add to top menu and open the file directly.
-
- Posts: 31
- Joined: Thu Feb 22, 2024 12:58 pm
- Location: Banbury=ish UK
Re: XFILES always opens on :MAIN
That would be ideal but how do I sellect the files option ? I should perhaps mention im doing this on a XP
-
- Posts: 77
- Joined: Tue Jan 03, 2023 10:03 pm
Re: XFILES always opens on :MAIN
Ah, what I wrote only works LZ machines. You might be able to write a OPL program which could do it, but maybe Martin Reid would know for sure.
-
- Posts: 54
- Joined: Wed Jan 04, 2023 7:51 pm
Re: XFILES always opens on :MAIN
XFILES for XP from Jaap's website has the default file set in XFILES.OPL just after the machine code section (all the MC% lines). The variable is: F0$="MAIN", the line before it reads the current pack using P%=PEEKB($A2), where $A2 is the memory location where the current pack is stored in the system variables.
Changing F0$ to your file and P% to 0,1 or 2 for A:, B: or C: should work to set the default. Then translate and save before running it.
Changing F0$ to your file and P% to 0,1 or 2 for A:, B: or C: should work to set the default. Then translate and save before running it.
-
- Posts: 31
- Joined: Thu Feb 22, 2024 12:58 pm
- Location: Banbury=ish UK
Re: XFILES always opens on :MAIN
Yes that works great.Thanks