1 (edited by AD1408 2023-03-31 23:19:17)

Topic: Local Files Bookmarks

Hi Guys,


I'm trying to put together a little utility for bookmarking (shortcuts) applications rather than using windows shortcuts.


It was going all OK but I noticed that when opening MVD apps RTF content is missing?
RTF files saved separately, not in DB.
I use:

procedure Form1_DBImage1_OnClick (Sender: TObject);
begin
OpenFile(Form1.edLink01.text);
end;

and shortcut used in edit box:
E:\08 Programs on E\QBookmarksSlim\QBookmarksSlim1.5.exe


Any idea what am I doing incorrectly?

Other apps seems to be loading OK


edit:
It seems that the issue with saving RTF files separately via script rather than in DB. Saving RTF files separately kindly provided by Derek. Perhaps Derek can offer a solution if possible.

Adam
God... please help me become the person my dog thinks I am.

Re: Local Files Bookmarks

J'ai fait un petit programme avec les raccourcis principaux de Windows, est-ce que c'est ca que vous voulez faire ?

Post's attachments

Attachment icon es.jpg 173.71 kb, 40 downloads since 2023-04-01 

Destiny

Re: Local Files Bookmarks

Not enough data to give advice.


1. Is the RTF file saved in your directory?
2. How do you open it? Script or program?
3. Do you specify the path to the file when you open it (concatenate the path with the file name)?
4. An error occurs?
5. Are there any checks and conditions in your script?
6. Quotes for text fields if you use SQL scripts?
...
and many many more things we can come up with without knowing what you have in the program. But this is just guesswork.

4 (edited by AD1408 2023-04-01 16:32:07)

Re: Local Files Bookmarks

Hi sparrow,
Please see attached sample project about how RTF files saved outside the DB


Hi Destiny,
Yes something like that, additionally using Treeview and tg for organization purposes.

Post's attachments

Attachment icon Adam_SavingRTFasLINKED 3 Delete after ConfWork.zip 9.9 kb, 141 downloads since 2023-04-01 

Adam
God... please help me become the person my dog thinks I am.

Re: Local Files Bookmarks

Everything works in your example. RTF is displayed, the picture is displayed. Records are created and displayed.

Re: Local Files Bookmarks

Hi Adam, Hi Sparrow,
I believe the problem is not that the .rtf file doesn't display when you run the program DIRECTLY (that is all good) but it's when you run it INDIRECTLY by first calling it from another program.
So
Application A works fine.
Application B (uses a tree view that lists all the applications that Adam has written);  click on a node in Application B that has a link (using 'openfile) to open Application A.  Application A opens okay but THEN try to view the .rtf  and nothing appears.
Not quite sure where the problem lies.
Derek.

Re: Local Files Bookmarks

derek wrote:

Hi Adam, Hi Sparrow,
I believe the problem is not that the .rtf file doesn't display when you run the program DIRECTLY (that is all good) but it's when you run it INDIRECTLY by first calling it from another program.
So
Application A works fine.
Application B (uses a tree view that lists all the applications that Adam has written);  click on a node in Application B that has a link (using 'openfile) to open Application A.  Application A opens okay but THEN try to view the .rtf  and nothing appears.
Not quite sure where the problem lies.
Derek.


Hi Derek and Sparrow,
Thank you very much for replies...
Derek describes my issue above very well.
Only slight difference is bookmarking app opens application by clicking on images as seen below:

https://thumbs2.imgbox.com/0c/04/bISK2w7y_t.jpg

Adam
God... please help me become the person my dog thinks I am.

Re: Local Files Bookmarks

Hi Adam, Sparrow,
The application that contains all the links is okay.
But try changing the way you specify the path when saving the original .rtf (line 48 in your script) as follows
Change it from

form2.edit2.text := 'rtfSTORE\' + form2.editcounter1.text + ' Main .rtf';

To

form2.edit2.text := extractfiledir(application.exename) + '\rtfSTORE\' + form2.editcounter1.text + ' Main .rtf';

In other words, it seems to need the full path when coming from a calling application.
Derek.

Re: Local Files Bookmarks

Hi Derek,
Thank you very much for your suggestion.
Unfortunately, it didn't work for me.

Adam
God... please help me become the person my dog thinks I am.

Re: Local Files Bookmarks

Insert before the RTF load function - showmessage('SELECT .. ( Your SQL query for the name of the RTF file)');
1. you will see if the execution reaches this point
2. will show you the name of the called file (if everything is correct).
Show the procedure for calling applications and loading RTF along with the text (showmessage) that will appear on the screen.

Re: Local Files Bookmarks

Hi Adam,
I'm surprised it didn't work - I created a small app containing links to other apps and it retrieved the .rtf files okay.
Check in your script whether you've added a '\' between the application path and the 'rtfstore' folder.
Also, if you're trying it on existing apps, then the saved links will still be in the 'old' format and you'll need to reset them.
Derek.

Re: Local Files Bookmarks

Hi Derek,
I think I found the reason of not working your latest script update. It doesn't work with older saved RTF but works with RTF saved after updating the script.
Once again thank you very much for your help......
Truly appreciated......

Adam
God... please help me become the person my dog thinks I am.