The MASM Forum

Miscellaneous => Miscellaneous Projects => Topic started by: jimg on November 10, 2024, 02:25:50 PM

Title: ScratchPad
Post by: jimg on November 10, 2024, 02:25:50 PM
Here's a little program I often find handy.
I thought I had previously released it, but I couldn't find it here anywhere.
It's opens up a blank window (richedit) to keep temporary notes, try things out, etc.
It can read and write files.

*** All options are in a right click context menu.

You can set defaults for next use, or just make onetime changes.

Mostly this started out as a border test program, but I found it useful so kept using it.


Will now accept file name from the command line.




Title: Re: ScratchPad
Post by: zedd151 on November 10, 2024, 02:46:08 PM
Post-It notes for your desktop.  :biggrin:
Runs fine, windows 7.  :thumbsup:

Cute idea.
I'll explore its options later.
Title: Re: ScratchPad
Post by: NoCforMe on November 10, 2024, 04:18:25 PM
I have a li'l program like that I wrote, called Scratchpad. Same idea, except it doesn't even read or save files: just a convenient edit window for copying stuff into and out of.
Title: Re: ScratchPad
Post by: sinsi on November 10, 2024, 04:50:26 PM
Hey Jim, nice one. A problem, if I hit F1 it shows the help dialog, but when I click OK it shows again.


Quote from: NoCforMe on November 10, 2024, 04:18:25 PMjust a convenient edit window for copying stuff into and out of.
So, like a clipboard  :badgrin:

I have my own, I call it Notepad :cool:
Title: Re: ScratchPad
Post by: NoCforMe on November 10, 2024, 05:33:33 PM
Quote from: sinsi on November 10, 2024, 04:50:26 PMHey Jim, nice one. A problem, if I hit F1 it shows the help dialog, but when I click OK it shows again.


Quote from: NoCforMe on November 10, 2024, 04:18:25 PMjust a convenient edit window for copying stuff into and out of.
So, like a clipboard  :badgrin:

I have my own, I call it Notepad :cool:

Yabbut, the reason I wrote mine is I don't want to be bugged whether I want to save my changes when I exit. It just exits.

Yes, basically a text-input interface to the clipboard. Nothing fancy.
Title: Re: ScratchPad
Post by: stoo23 on November 10, 2024, 07:36:55 PM
QuoteI have my own, I call it Notepad :cool:
Yeah same, I utilize Notepad, as a 'Scratch-Pad' heaps  :smiley:
Title: Re: ScratchPad
Post by: zedd151 on November 10, 2024, 07:37:18 PM
Quote from: sinsi on November 10, 2024, 04:50:26 PMHey Jim, nice one. A problem, if I hit F1 it shows the help dialog, but when I click OK it shows again
Maybe it thought you needed more help?  :tongue:

When clicking the 'Help' Menu item seems to work as expected, though. When you close the dialog it closes, and another instance of help dialog does not pop up.

But yes, using F1 also show the effect here as well. The help dialog closes, but another instance of the help dialog opens.
Title: Re: ScratchPad
Post by: sinsi on November 10, 2024, 07:41:55 PM
Quote from: zedd151 on November 10, 2024, 07:37:18 PM
Quote from: sinsi on November 10, 2024, 04:50:26 PMHey Jim, nice one. A problem, if I hit F1 it shows the help dialog, but when I click OK it shows again
Maybe it thought you needed more help?  :tongue:
Nah, anyone will get it if you repeat it, but the second one should be YELLING :biggrin:
Title: Re: ScratchPad
Post by: Vortex on November 10, 2024, 08:09:47 PM
Hi jimg,

Very nice job :thumbsup:
Title: Re: ScratchPad
Post by: jimg on November 11, 2024, 02:46:45 AM
Quote from: sinsi on November 10, 2024, 04:50:26 PMHey Jim, nice one. A problem, if I hit F1 it shows the help dialog, but when I click OK it shows again.
Thanks. Updated in first post.  Commented out WM_HELP handler in favor of WM_KEYDOWN event.  Guess I never asked for help in the 10+ years I've been using this.
Title: Re: ScratchPad
Post by: HSE on November 11, 2024, 04:29:31 AM
Hi Jim!

  Very interesting  :thumbsup:
Title: Re: ScratchPad
Post by: mabdelouahab on November 11, 2024, 04:36:51 AM
Nice  :thumbsup:
Title: Re: ScratchPad
Post by: stoo23 on November 11, 2024, 05:20:30 AM
Yeah,..  :thumbsup:
Shame it doesn't have a Kool Icon for the desktop  :wink2:  :smiley:
Title: Re: ScratchPad
Post by: jimg on November 11, 2024, 02:47:43 PM
One last quickie update (hopefully) in first post.  I added the ability to open a file entered on the command line.  This means I can add it to my right-click context menu for files.  Then I can open a file from the file's context menu.

stoo...   Not big on making icons (see covers (http://masm32.com/board/index.php?topic=7497.0))
  but feel free to add an icon if you like.
Title: Re: ScratchPad
Post by: stoo23 on November 11, 2024, 05:03:26 PM
Quotestoo...   Not big on making icons (see covers)
:biggrin:

Quotebut feel free to add an icon if you like.
OK will post if/when I come up with something appropriate  :cool:
Title: Re: ScratchPad
Post by: raymond on November 12, 2024, 05:06:22 AM
Quotestoo...   Not big on making icons

Same here.

While on that subject, how could I define a given area in an icon which would be transparent?
Title: Re: ScratchPad
Post by: ognil on November 12, 2024, 06:42:18 AM
Hi Raymond, :smiley:

I use icofx.
https://icofx.ro/
Title: Re: ScratchPad
Post by: TimoVJL on November 12, 2024, 08:13:01 AM
IcoFX Portable (https://portableapps.com/apps/graphics_pictures/icofx_portable)

poide have an icon editor
Title: Re: ScratchPad
Post by: NoCforMe on November 12, 2024, 08:40:56 AM
Try Axialis IconWorkshop (https://www.axialis.com/iconworkshop/). It's not free, but you can download a trial version that has pretty much full functionality. Very featureful.

I'm pretty sure this is what Hutch used to create icons for his programs here.

Or you can use my li'l command-line (console) utility to convert a BMP to an ICO, BMP2ICO attached here. It lets you define a color index as transparent (you need to know what the palette index is, easily found with any BMP image editor).
Title: Re: ScratchPad
Post by: jimg on November 12, 2024, 11:50:30 PM
Updated in first post to fix two menu bugs.
Title: Re: ScratchPad
Post by: raymond on November 14, 2024, 08:57:37 AM
Quote from: raymond on November 12, 2024, 05:06:22 AM
Quotestoo...  Not big on making icons
Same here.
While on that subject, how could I define a given area in an icon which would be transparent?

Thanks guys for the links :thumbsup:. It took me a while to get the IcoFX to do what I wanted (must be old age setting in :dazzled: :rolleyes:) but finally got the intended results.

Title: Re: ScratchPad
Post by: jimg on December 17, 2024, 11:15:06 AM
Minor update in first post.
Added ability to drag a window above top of screen without Windows truncating it.
Title: Re: ScratchPad
Post by: jimg on January 13, 2025, 05:38:11 AM
Major update in first post.  Hopefully fixed all the bugs with saving settings and defaults.
Also added find/replace capability.
Title: Re: ScratchPad
Post by: HSE on January 13, 2025, 01:08:55 PM
Hi Jim!

Perhaps I don't understand the logic of "Close this Window" and "Exit" (or something is wrong).

If you open several instances running the program, then "close all windows" don't close all windows  :rolleyes:

If you open several instances from an instance, then "close this window" close all windows   :biggrin:

HSE


 
Title: Re: ScratchPad
Post by: jimg on January 13, 2025, 02:18:27 PM
That was definitely a bug I introduced when fixing evreything else. "Close this Window" is supposed to only close the one window that has focus.  I should have an update shortly.

edit:
This may take longer than I thought.  Identical code in old and new behaves differently and I haven't figured out why yet.  Will probably be tomorrow before a fix.
Title: Re: ScratchPad
Post by: jimg on January 13, 2025, 05:24:18 PM
Updated in first post.  Deleted leftover test code.  Fixed Find so enter immediately searches.

HSE-  Let me know if still confusing please.
Title: Re: ScratchPad
Post by: HSE on January 13, 2025, 11:36:53 PM
Hi Jim!

Quote from: jimg on January 13, 2025, 05:24:18 PMLet me know if still confusing please.

:thumbsup: New windows are not new program instances, and you can communicate between them. But there is no communication between instances.

HSE
Title: Re: ScratchPad
Post by: jimg on January 14, 2025, 12:54:14 AM
True.  I never considered communications between instances.  What kind of communication should there be?
Title: Re: ScratchPad
Post by: HSE on January 14, 2025, 03:08:26 AM
Quote from: jimg on January 14, 2025, 12:54:14 AMWhat kind of communication should there be?

I'm using almost same Hutch's Simple inter application communication (https://masm32.com/board/index.php?topic=8104.0) with RegisterWindowMessage and HWND_BROADCAST. Very easy.

LookingFor (https://masm32.com/board/index.php?topic=11888.0) is an example.

Title: Re: ScratchPad
Post by: jimg on January 14, 2025, 04:20:15 AM
Yes, thanks.
Title: Re: ScratchPad
Post by: jimg on January 16, 2025, 05:16:14 PM
update in first post.
Added merge option.
fixed serious bug.