Page 1 of 1

XFILES always opens on :MAIN

Posted: Wed Apr 03, 2024 9:41 am
by Zzoom
Im using XFILES to view and edit a database and its working great .But everytime I access XFILES the default is :MAIN :x 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 ??

Re: XFILES always opens on :MAIN

Posted: Wed Apr 03, 2024 10:59 am
by Daren
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.

Re: XFILES always opens on :MAIN

Posted: Wed Apr 03, 2024 2:36 pm
by Zzoom
That would be ideal but how do I sellect the files option ? I should perhaps mention im doing this on a XP :shock:

Re: XFILES always opens on :MAIN

Posted: Wed Apr 03, 2024 3:04 pm
by Daren
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.

Re: XFILES always opens on :MAIN

Posted: Wed Apr 03, 2024 6:31 pm
by MartinP
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.

Re: XFILES always opens on :MAIN

Posted: Wed Apr 03, 2024 11:02 pm
by Zzoom
Yes that works great.Thanks :D