Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

Post your working scripts, libraries and tools
drozdman
Posts: 63
Joined: 05 Dec 2015, 01:07

Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

19 Mar 2018, 17:16

I'll dump some older AutoHotkey scripts. May be useful for someone.

Save the file in Unicode or UTF-8 with signature (not in UTF-8 as it is chosen with the download feature here - it messes up unicode characters).

First. Quick Notes from the old forum.

Code: [Select all] [Expand] [Download] (Quick Notes by Drozdman.ahk)GeSHi © Codebox Plus




Alarm Timer


Code: [Select all] [Expand] [Download] (Alarm Timer.ahk)GeSHi © Codebox Plus





Stopper

Code: [Select all] [Expand] [Download] (stopper.ahk)GeSHi © Codebox Plus



Auto timer. Run from another program with line: Run, Alarm_timer_auto.ahk "minutes" "text" "no beep"

Code: [Select all] [Expand] [Download] (Alarm_timer_auto.ahk)GeSHi © Codebox Plus



Maybe also this:
Snipping Tool (quick screenshots)

Code: [Select all] [Expand] [Download] (Snipping Tool.ahk)GeSHi © Codebox Plus

makeGUI=file%A_Gui%

;FileCopy, %file%, %FileName%
FileCopy, %file%, %FileName%= DllCall(
Last edited by drozdman on 13 Aug 2018, 17:31, edited 22 times in total.
burque505
Posts: 546
Joined: 22 Jan 2017, 19:37

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

21 Apr 2018, 17:02

drozdman, thank you very much for sharing these scripts. Quick Notes.ahk is especially nice.
Regards,
burque505
StefOnSteroids
Posts: 40
Joined: 08 Aug 2015, 10:22

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

26 Apr 2018, 13:37

Thanks for sharing.
AutoTimer and QuickNote sound promising, will try them out over the weekend
drozdman
Posts: 63
Joined: 05 Dec 2015, 01:07

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

19 May 2018, 18:20

I realized that this was an old version of "Quick Notes" which didn't correctly set font color on resize. I've been using a different customized version, so I didn't even notice.
I changed it in the first post. This version still doesn't include option "previous" in find in text. Maybe I will update it some day.
Edit: Actually it wasn't a big deal. It's changed. I copied the routine from that script.
DutchPete
Posts: 90
Joined: 03 Feb 2015, 03:59

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

21 Jun 2018, 06:03

Hi drozdman, I discovered this recently and have used the Quick Notes code. I wanted to have the QN windows bigger when it opens, but did not know how/what to insert where. So I had the idea of writing a script that opens the QN script and increases the width and height. Someone else helped me with the code.

While that works fine, it is a workaround and I feel it must be able to integrate the enlargement code in the original.
Since my knowledge of coding is extremely low, could you advise me where to insert the code in your script?

The code I have in my workaround script is as follows:

Code: [Select all] [Download] GeSHi © Codebox Plus

Run, "C:\Users\Peter\Scripts\AHK\quicknotes.ahk",,, PID
WinWait, ahk_pid %PID%
WinActivate, ahk_pid %PID%
Width:=1200
Height:=700
x_var := (A_ScreenWidth//2) - (Width//2) ;Note "A_ScreenWidth" is a variable that is built into ahk that gets the screen resolution for you, same with "A_ScreenHeight"
y_var := (A_ScreenHeight//2) - (Height//2)
y_var -= 10
WinMove, ahk_pid %PID%, ,x_var ,y_var ,Width,Height
drozdman
Posts: 63
Joined: 05 Dec 2015, 01:07

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

21 Jun 2018, 09:30

@DutchPete
I changed it a little.
In the beginning of the script I added Width_B:=765 , Height_B:=592 (in your case should be Width_B:=1200 , Height_B:=700).
And Gosub, Big at line 217.
Now it goes to the big size at launch and you can specify desired size.


Code: [Select all] [Expand] [Download] (Quick Notes.ahk)GeSHi © Codebox Plus

Last edited by drozdman on 22 Jun 2018, 16:38, edited 2 times in total.
DutchPete
Posts: 90
Joined: 03 Feb 2015, 03:59

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

21 Jun 2018, 10:37

@drozdman: many thanks for your quick reply.
Couple of things:
1. You added the width adjustment, but not the moving of the window. From my previous message I added as follows:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



In my script to activate the Quick Notes script it worked, but not in your amended version. Please advise.

The other point I noticed is that pressing F1 brings up the QN window, but in its reduced size, whereas pressing F4 brings it up in its enlarged size.
And, last but not least,it would be useful to get a prompt suggesting to save if changes have been made to any of the notes in the window. You mention that can be saved, but not how. Please advise.
drozdman
Posts: 63
Joined: 05 Dec 2015, 01:07

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

21 Jun 2018, 11:04

@DutchPete
Don't use your script to start it. It changes the size on its own. There is already CenterWindowSize function in it.
I tried it on Win 7, and it works.

I added the previously disabled feature "save on exit" in the previous post (now edited).

Code: [Select all] [Download] (Untitled.ahk)GeSHi © Codebox Plus

Close:
GuiClose:
MsgBox, 4100, Confirm exit, Do you want to save before exiting Quick Notes?
IfMsgBox, Yes
Gosub,Save_All_and_Exit
IfMsgBox, No
ExitApp
return


I did not change the script in the opening post. Use the one in my previous post. That one was changed.

And of course you have to change Width_B:=765 , Height_B:=592 to your own Width_B:=1200, Height_B:=700
in the script.
DutchPete
Posts: 90
Joined: 03 Feb 2015, 03:59

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

21 Jun 2018, 12:20

@drozdman: yes, your revised script works on my Win 8.1/64-bit computer. :)
With that bit of my extra code (y_var) I was hoping to move it up a few pixels. Never mind, we can leave that aside.

You say that after changing something, then closing (by clicking on the red cross in the top right corner), one should get the prompt Do you want to save before exiting Quick Notes?.
I don't get that, all I get is Do you want to exit Quick Notes?, which comes up whether I have made changes or not. And since I clicked on the red cross I always answer that question with yes, which means I sometimes don't save my changes. So, in my modest opinion, this is not right because it is a risk.
drozdman
Posts: 63
Joined: 05 Dec 2015, 01:07

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

21 Jun 2018, 13:14

@DutchPete
I checked your code and the move works.
Did you get the updated version?

drozdman wrote: I did not change the script in the opening post. Use the one in my previous post. That one was changed.
.


It should have this in the end:

Code: [Select all] [Download] (Untitled.ahk)GeSHi © Codebox Plus


Close:
GuiClose:
MsgBox, 4100, Confirm exit, Do you want to save before exiting Quick Notes?
IfMsgBox, Yes
Gosub,Save_All_and_Exit
IfMsgBox, No
ExitApp
return


Edit:
I didn't want to mess with the initial post, but now I changed this version too, so it saves on exit.
Also F1 was changed to F4 in the comment section (it was an old version of the script that used F1 - comment wasn't updated).
DutchPete
Posts: 90
Joined: 03 Feb 2015, 03:59

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

21 Jun 2018, 23:32

@drozdman: yes, that works fine. It displays the prompt Do you want to save before exiting Quick Notes?, whether one has changed something or not, and that is fine.
I want to thank you 1) for sharing a useful script - I can remove a Firefox add-on :), and 2) for your help these past 2 days. I am impressed !

2 last questions, mostly out of curiosity:
* is there a reason why, when bringing QN into focus with F4, all of the text on the note is selected?
* just to the right of the Save diskette on the QN window there is a number in red and one in blue. What do they mean? Can I use them for anything?
drozdman
Posts: 63
Joined: 05 Dec 2015, 01:07

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

22 Jun 2018, 16:57

This is an old script, I didn't bother with it too much, because I use a different more complex version, more customized.
Since someone uses it, I made some quick changes. I tested it, but not that much, so if there is a problem, someone can report it.
There may be a problem with "Find in text" for some, because it uses RegEx. For me it was the best option, but I added a checkbox to choose.
I copied "remember previous queries" from my main script (ComboBox).
I added the save on exit with the "modified" check as requested by DutchPete.



DutchPete wrote:2 last questions, mostly out of curiosity:
* is there a reason why, when bringing QN into focus with F4, all of the text on the note is selected?
?


I don't experience that. I checked on Win7 and Win8. That's not intended, if happens.
Edit:
Actually, I noticed it. I use a mouse over on another GUI to bring it to front.
Maybe a problem with F4 button? I don't know. Maybe another hotkey would solve it. You can change this below with maybe ^d::.

Code: [Select all] [Download] (Untitled.ahk)GeSHi © Codebox Plus

~$F4::
Gui 1: Show
return


DutchPete wrote:* just to the right of the Save diskette on the QN window there is a number in red and one in blue. What do they mean? Can I use them for anything
?


Those are letter and word count.
DutchPete
Posts: 90
Joined: 03 Feb 2015, 03:59

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

23 Jun 2018, 01:16

@drozdman: sorry to bother you again, but now I have another issue.
I downloaded your code again, and did not make any changes. I did delete the old notes-files folder, so the new version would set up everything from scratch.
Launching it, it opened with 8 note tabs. Good.
I changed the names and fonts of tabs 1-4, saved it, then closed it. When I opened QN again, it only shows notes 6-7, notes 1-4 are missing.
Yesterday things went fine when I reported that it was working well, then suddenly it started doing this. That is why I downloaded a clean copy again, but unfortunately it did it again immediately upon the reopening, as described.

Note: if you are fed up with all this and don't want to answer anymore, I understand, no hard feelings :)
drozdman
Posts: 63
Joined: 05 Dec 2015, 01:07

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

23 Jun 2018, 11:00

@DutchPete
I changed it a little.
In the beginning of the script I added Width_B:=765 , Height_B:=592 (in your case should be Width_B:=1200 , Height_B:=700).
And Gosub, Big at line 217.
Now it goes to the big size at launch and you can specify desired size.


Code: [Select all] [Expand] [Download] (Quick Notes by Drozdman tab2.ahk)GeSHi © Codebox Plus

Last edited by drozdman on 28 Jul 2018, 00:38, edited 4 times in total.
drozdman
Posts: 63
Joined: 05 Dec 2015, 01:07

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

23 Jun 2018, 11:15

@DutchPete
That's because names are too long, probably. Originally it was intended to be small, so the names were supposed to be short.
An easy fix is to change is w403 to something bigger. Like w600 or w800
In this line( around line 195):
Gui,1: Add, Tab2, x0 y25 w403 +Theme -Background vTabName gChange , %n1%|%n2%|%n3%|%n4%|%n5%|%n6%|%n7%|%n8%

Though, the script uses Tab2 the older implementation of tabs on AHK. I changed it to Tab3. It has its own problems, but it may be better for longer names and for bigger size of the GUI.

I changed the script in the opening post to include the updated version for Tab3 implementation. The old one is still here
Last edited by drozdman on 28 Jul 2018, 00:37, edited 1 time in total.
DutchPete
Posts: 90
Joined: 03 Feb 2015, 03:59

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

23 Jun 2018, 11:43

drozdman wrote:@DutchPete
That's because names are too long, probably. Originally it was intended to be small, so the names were supposed to be short.
An easy fix is to change is w403 to something bigger. Like w600 or w800
In this line( around line 195):
Gui,1: Add, Tab2, x0 y25 w403 +Theme -Background vTabName gChange , %n1%|%n2%|%n3%|%n4%|%n5%|%n6%|%n7%|%n8%

Though, the script uses Tab2 the older implementation of tabs on AHK. I changed it to Tab3. It has its own problems (when resizing, hence this is in the script: wE:=2100 ,hE:=1100), but it may be better for longer names and for bigger size of the GUI.

I changed the script in the opening post to include the updated version for Tab3 implementation. The old one is still here

@drozdman: many thanks for all your detailed help, I sure appreciate it :D
drozdman
Posts: 63
Joined: 05 Dec 2015, 01:07

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

24 Jul 2018, 17:03

@DutchPete
I changed it again and made the 'modified' option at exit in a correct way.

I'm also thinking about making a "rich edit" (.rtf) version of "Quick Notes" using Class_RichEdit by "just me".
DutchPete
Posts: 90
Joined: 03 Feb 2015, 03:59

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

24 Jul 2018, 23:31

drozdman wrote:@DutchPete
I changed it again and made the 'modified' option at exit in a correct way.

I'm also thinking about making a "rich edit" (.rtf) version of "Quick Notes" using Class_RichEdit by "just me".

Thank you.
burque505
Posts: 546
Joined: 22 Jan 2017, 19:37

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

25 Jul 2018, 07:34

@drozdman, thanks again. I'm looking forward to your RichEdit version!
Regards,
burque505
burque505
Posts: 546
Joined: 22 Jan 2017, 19:37

Re: Old scripts: Alarm Timer. Stopper. Quick Notes. Snipping Tool.

25 Jul 2018, 10:29

I have a debug version of RichEdit Quick Notes (zip attached).
I will post an animated GIF in a few minutes. I still need to add RTF copy-and-paste capability (for now I'm using my CB_RTF2Clip.ahk to get images onto the clipboard and into Quick Notes).
Quick_Notes_3.zip
(28.23 KiB) Downloaded 9 times

Regards,
burque505
EDIT: Here's screencastlet:
QuickNotes_RTF.gif
QuickNotes_RTF.gif (101.28 KiB) Viewed 340 times

EDIT: PS - in case there's no reference to it in the code, the rich text stuff is mostly due to the efforts of just me, DigiDon, and jeeswg.

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 26 guests