STUSK (Stupid site keeper)

Share your advanced PureBasic knowledge/code with the community.
Perkin
Enthusiast
Enthusiast
Posts: 504
Joined: Thu Jul 03, 2008 10:13 pm
Location: Kent, UK

Re: STUSK (Stupid site keeper)

Post by Perkin »

:lol:



Will do, I'll have a play with it (the software that is) and see if there's anything an idiot like me would like added. Thanks.
%101010 = $2A = 42
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: STUSK (Stupid site keeper)

Post by Fangbeast »

Perkin wrote::lol:

Will do, I'll have a play with it (the software that is) and see if there's anything an idiot like me would like added. Thanks.
Hello, seems that I made a small mistake in excluding the idea of having "All categories" in the category drop down for each user. Just fixing things now.

Basically, what would happen with the queries is that any owner of a set of records would end up only being able to search one category at a time, assuming that he/she knew which category they were going to find the match in.

Bad mistake on my part. I've added back the "All categories" search ability so that you can search all categories at once in addition to the chosen one.

Just testing the logic now. A few routines had to be reworked.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Perkin
Enthusiast
Enthusiast
Posts: 504
Joined: Thu Jul 03, 2008 10:13 pm
Location: Kent, UK

Re: STUSK (Stupid site keeper)

Post by Perkin »

Fangles, I may be doing something wrong, but...

Started from scratch, new clean directory, extracted Sitelist2
entered password twice
ERROR - Database Open Error - Serious error trying to open system database.....

When then trying add any sites/imports etc - nothing gets added.

(Brain freeze in effect)
What am I missing?
%101010 = $2A = 42
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: STUSK (Stupid site keeper)

Post by Fangbeast »

Fangles, I may be doing something wrong, but...
No, you are doing it right, it's my oversight.
Started from scratch, new clean directory, extracted Sitelist2 entered password twice ERROR - Database Open Error - Serious error trying to open system database.....
It's a directory permissions problem. I'm running under Windows 7 (others under vista would also have this problem) in that i've always had a .\database directory and never come up against it.

So, i've started from scratch like you did and created a directory, threw SiteList2 into it and ran it, same error. The program runs when asked because you were able to create the directory to put it in so you obviously had permission but has no permission to create the database and system directories and fails, causing all the other problems.

So, since this is a portable program and the database has to go with it, I can fudge the whole thing and create the database and ini file in the program directory and avoid the whole mess or try to figure this out (might take a while with me). What option is the best?

I've seen a lot of argument about putting the database into the logged on user's data directory but the user would never find it to take it with them!!

When then trying add any sites/imports etc - nothing gets added.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Perkin
Enthusiast
Enthusiast
Posts: 504
Joined: Thu Jul 03, 2008 10:13 pm
Location: Kent, UK

Re: STUSK (Stupid site keeper)

Post by Perkin »

I think, as you've said, as its a portable app that the files should be created in the apps dir.
As, again as you said, you really need to bring the files with you.

Any way it works, will be alright.

I'm trying Win7 as well, trying to stick with it.
I'm also using 64bit version, even more problems for me.
(getting old code to work again, ~ massive prob at moment with a supposed x64 dll not working properly)
%101010 = $2A = 42
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: STUSK (Stupid site keeper)

Post by Fangbeast »

I've found out what happened and it appears not to be an issue with permissions but with unicode. I can even reproduce this

If I run this with unicode off in the compiler, it works. If I run this with unicode on, it fails and I don't know why. Still looking.

MakeSureDirectoryPathExists_("C:\Nibble\Nobbys\Nuts\")

Debug GetLastError_() (2 for okay, 0 for fail)

*EDIT*

MSDN says this function does not support unicode strings. I have to use SHCreateDirectoryEx but don't know how, yet. Working on it.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: STUSK (Stupid site keeper)

Post by Fangbeast »

Perkin, fixed and reuploaded, sorry about that.

Local system and database directories are now created okay, tested, even in a directory off the root of a windows 7 system (Windows 7 Ultimate OEM). Works here.

Local system and database directories are now checked if pre-existing and no error generated as a result.

Fixed some missing windows closing code on the first time password window.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Perkin
Enthusiast
Enthusiast
Posts: 504
Joined: Thu Jul 03, 2008 10:13 pm
Location: Kent, UK

Re: STUSK (Stupid site keeper)

Post by Perkin »

Thanks for update.

How do you set the 'Site home page' entry, so when doing a 'CTRL+W' it opens the webpage of the site.

I've tried adding an entry with a site and changing the 'Miscellaneous' category to 'Site home page'
but that didn't work.
In Sitelist v1 it was a lot clearer when entering base details.



One thing that you might consider, is to be able to copy the username of an entry to the clipboard,
and also maybe the password)

And to make it harder, have a setting that is a time amount, when expired, overwrites/empties clipboard data.

So if set at 20 seconds, when copying the password, you have twenty seconds before the clipboard is erased again. May be a security feature?
(Also delete clipboard when exiting if less that 20 secs.)
%101010 = $2A = 42
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: STUSK (Stupid site keeper)

Post by Fangbeast »

How do you set the 'Site home page' entry, so when doing a 'CTRL+W' it opens the webpage of the site.
I'm still figuring out the best way to do that. In v1, the site address was a set field/label so a button next to it was permanent and not confusing. In v2, all labels; and thus the fields; are changeable, so i'd have to loop through all fields checking for a "http://" as combobox doesn't seem to support 'focus' eventtype. Or I would have to make every field available to the event gadget checker. I will play with it and see what is the best solution.
I've tried adding an entry with a site and changing the 'Miscellaneous' category to 'Site home page' but that didn't work.
I've just added a new site, selected a category and saved it. Then I reloaded the new site, selected another category and saved it. Seems to work here, could you outline the steps you took?
In Sitelist v1 it was a lot clearer when entering base details.
True, it was clearer. But now, this version has changeable labels so that it can be more freeform and you can add more details. It brings with it new challenges but for me, it's good because I can distinctly separate internet site details from program details, banking details, all of which have totally different labels.

I've wanted this feature ever since I had my first palmpilot pda 8 years ago and saw their desktop software support it.
One thing that you might consider, is to be able to copy the username of an entry to the clipboard, and also maybe the password).
Not sure what you mean. When you highlight a record/records, all fields not empty get copied to the clipboard already, along with their respective labels.

If you mean the record owner, that is already copied to the clipboard as it is part of the data record. If you meant the program password, that is impossible as only the MD5Fingerprint of the password is created and the password cannot be recreated from it and that way, nobody can ever guess your password.
And to make it harder, have a setting that is a time amount, when expired, overwrites/empties clipboard data.
That's easy. When you copy data to the clipboard, a timer can be fired off to erase that data. and when the program exits, the clipboard should be cleared anyway.

P.s. Do you want to be able to launch the home page from the main list or the data form?
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Perkin
Enthusiast
Enthusiast
Posts: 504
Joined: Thu Jul 03, 2008 10:13 pm
Location: Kent, UK

Re: STUSK (Stupid site keeper)

Post by Perkin »

Brain isn't working well today (so what else is new? :roll: ) so I'll try and be clearer.

When you've got the 'Site home page' (CTRL+W) link done :wink: , so the webpage opens, it may be handy to be able to copy just the Username to the clipboard, ready for pasting into site logins.
Then copy just the password to clipboard, again ready to be pasted, but this time on a timed action, so after certain time clipboard is wiped for security purposes.


regarding 'Site home page' - would it be possible/easier to have a few set fields, like Sitelist v1
(Site Name - User name - Password - Site homepage) and have the rest dynamic a la v2
Ones that pretty much all entries will have.
I've tried adding an entry with a site and changing the 'Miscellaneous' category to 'Site home page' but that didn't work.
I've just added a new site, selected a category and saved it. Then I reloaded the new site, selected another category and saved it. Seems to work here, could you outline the steps you took?
I meant not working as Site Home Page - CTRL+W
But as you've said that isn't working anyway.


One more addition could be option to display more columns in the listview.
Not major need but could be handy.


Edit: CTRL+W
If data form is open launch this site.
If Main list and an entry is highlighted/selected - launch that site.

Edit 2: typos bloody new keyboard is narrower than old one.
My poor chubby fingers haven't compensated yet. :lol:
%101010 = $2A = 42
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: STUSK (Stupid site keeper)

Post by Fangbeast »

Brain isn't working well today (so what else is new?) so I'll try and be clearer.
Mine was pickled years ago!
When you've got the 'Site home page' (CTRL+W) link done, so the webpage opens, it may be handy to be able to copy just the Username to the clipboard, ready for pasting into site logins. Then copy just the password to clipboard, again ready to be pasted, but this time on a timed action, so after certain time clipboard is wiped for security purposes.
I understand but this is no longer just a site lister program and people would/will store details all over the place. They aren't all tidy like us:):) I'd have to scan EVERY field to check the labels so that I knew what fields were passwords and usernames. And this is now unicode so, the labels could be in any language..And no way to detect what is or isn't a username and password without the labels giving me a clue.
regarding 'Site home page' - would it be possible/easier to have a few set fields, like Sitelist v1 (Site Name - User name - Password - Site homepage) and have the rest dynamic a la v2
Ouch! massive reverse engineering to be done here. Maybe a special Perkin Version sometime?
I meant not working as Site Home Page - CTRL+W But as you've said that isn't working anyway.
It will, once I figure out which is the best way. Okay, you answered me below:):) I will do it from the main list only. Launching things from an open data window is asking for things to happen (especially if you are me!!)
One more addition could be option to display more columns in the listview. Not major but could be handy.
How many do you need and what should the generic field headings be? And the form should grow bigger for legibility of course.
Edit: CTRL+W
If Main list and an entry is highlighted/selected - launch that site.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Perkin
Enthusiast
Enthusiast
Posts: 504
Joined: Thu Jul 03, 2008 10:13 pm
Location: Kent, UK

Re: STUSK (Stupid site keeper)

Post by Perkin »

Fangbeast wrote:
regarding 'Site home page' - would it be possible/easier to have a few set fields, like Sitelist v1 (Site Name - User name - Password - Site homepage) and have the rest dynamic a la v2
Ouch! massive reverse engineering to be done here. Maybe a special Perkin Version sometime?
Only an idea, I thought it may have been a benefit for working out the 'site home page' problem.
%101010 = $2A = 42
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: STUSK (Stupid site keeper)

Post by Fangbeast »

Perkin wrote:
Fangbeast wrote:
regarding 'Site home page' - would it be possible/easier to have a few set fields, like Sitelist v1 (Site Name - User name - Password - Site homepage) and have the rest dynamic a la v2
Ouch! massive reverse engineering to be done here. Maybe a special Perkin Version sometime?
Only an idea, I thought it may have been a benefit for working out the 'site home page' problem.
In v1 with set labels, yes. In v2 with freeform labels, no. But if I scan every field for the presence of a "http://", it could be done. But there is still a chance that people would have more than one. A dilemma.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Perkin
Enthusiast
Enthusiast
Posts: 504
Joined: Thu Jul 03, 2008 10:13 pm
Location: Kent, UK

Re: STUSK (Stupid site keeper)

Post by Perkin »

If you can check the labels, then you could look for the first label with the title 'Site home page'
and if the entry accompanying it is a web address then you can use that for the link.

:twisted: If you can't check the labels - Why not? :twisted: :lol:
%101010 = $2A = 42
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: STUSK (Stupid site keeper)

Post by Fangbeast »

1 Password bugs fixed.

2 Launch internet page from entry in the list if the 'home page' field has one

3 Print selected (or all) records from list. With preview.

Link in first post as usual.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Post Reply