Search found 127 matches

by Lem2001
13 Mar 2020, 11:32
Forum: Ask for Help (v1)
Topic: Different actions on Short-press and Long-press of hotkey Topic is solved
Replies: 4
Views: 1246

Different actions on Short-press and Long-press of hotkey Topic is solved

I would like to assign a 'focus Desktop' command to the Win D hotkey to set focus to the Desktop without hiding / minimizing any open windows (e.g. something like WinActivate, ahk_class Progman ). I also want to retain the existing built-in Windows 'Show Desktop' function (i.e. hide all windows, the...
by Lem2001
27 Oct 2019, 15:37
Forum: Ask for Help (v1)
Topic: Retaining a text file's existing ANSI or Unicode format after editing
Replies: 1
Views: 342

Retaining a text file's existing ANSI or Unicode format after editing

  I'm using some Regex to perform text edits on the contents of a plain text ini file. FileDelete, TestINI_New.ini FileRead, AllFile, TestINI.ini FileAppend, % RegExReplace(AllFile, "`amsU)(?<=\[Recent\])(.*)(?=^\[\w+]$)","`n`n`n$2"), TestINI_New.ini run, TestINI_New.ini However, when these changes ...
by Lem2001
27 Oct 2019, 12:45
Forum: Ask for Help (v1)
Topic: Edit text within an .ini file Topic is solved
Replies: 13
Views: 2688

Re: Edit text within an .ini file Topic is solved

Something like this: RegExReplace(AllFile, "s)(^|\R)\[Recent](?=(\R|$))\K(.*?(?=\R\[\w+](?2))|(.(?!.*\R\[\w+](?2))+)*$)", "`n`n`n") Thank you very much. This works great! I was ready to closely examine the changes made to the Regex command (compared to the previous solution) to see if I could start...
by Lem2001
22 Oct 2019, 16:12
Forum: Ask for Help (v1)
Topic: Edit text within an .ini file Topic is solved
Replies: 13
Views: 2688

Re: Edit text within an .ini file Topic is solved

I can't believe that I am back asking for help on this topic again <sigh>. Sorry. Everything was working great, but I have discovered that after cleaning, when I next run the software (and more recent entries get created) the [Recent] section has moved to the very end of the .ini file! Presumably it...
by Lem2001
22 Oct 2019, 09:08
Forum: Ask for Help (v1)
Topic: Edit text within an .ini file Topic is solved
Replies: 13
Views: 2688

Re: Edit text within an .ini file Topic is solved

3 blank lines require 4 line breaks. Yeah, that was the only part of the Regex command that I understood, so I had already fixed that bit by just adding another line break. $2 does nothing, it's redundant. I didn't know what $2 did, so I just left it alone. But now that I know it's not needed, I ha...
by Lem2001
21 Oct 2019, 23:37
Forum: Ask for Help (v1)
Topic: Edit text within an .ini file Topic is solved
Replies: 13
Views: 2688

Re: Edit text within an .ini file Topic is solved

Odlanir wrote:
20 Oct 2019, 11:56
This should work:
This is amazing!

It covers every possible instance while keeping the next section heading (and the rest of the ini content) safe.

Thank you so much for your help.
by Lem2001
21 Oct 2019, 23:36
Forum: Ask for Help (v1)
Topic: Edit text within an .ini file Topic is solved
Replies: 13
Views: 2688

Re: Edit text within an .ini file Topic is solved

AHKStudent wrote:
20 Oct 2019, 12:17
sorry OP for my long code
Not at all.

I am grateful to you for taking the time to reply to try to help me.
by Lem2001
20 Oct 2019, 10:27
Forum: Ask for Help (v1)
Topic: Edit text within an .ini file Topic is solved
Replies: 13
Views: 2688

Re: Edit text within an .ini file Topic is solved

Thank you both for your replies. Odlanir , your first example was the one I ended up using. It is very clean and elegant (and works well). I could not have figured this out for myself (Regex is not my strong point). There is just one problem with it; the method that you've used for detecting the nex...
by Lem2001
18 Oct 2019, 16:00
Forum: Ask for Help (v1)
Topic: Edit text within an .ini file Topic is solved
Replies: 13
Views: 2688

Edit text within an .ini file Topic is solved

How would I go about editing and ini file to partially remove some of its contents (between two section headers)? For example, if I had a file called settings.ini and within this file was sections (each one enclosed in square brackets) something like this: [Preferences] color=#ff00ee size=34 etc. [R...
by Lem2001
17 Oct 2019, 20:33
Forum: Ask for Help (v1)
Topic: Prevent repeat triggering while using KeyWait command Topic is solved
Replies: 6
Views: 848

Re: Prevent repeat triggering while using KeyWait command Topic is solved

Thank you Hellbent.

Your last code sample works absolutely perfectly!
It behaves exactly as I wanted.
by Lem2001
17 Oct 2019, 18:38
Forum: Ask for Help (v1)
Topic: Prevent repeat triggering while using KeyWait command Topic is solved
Replies: 6
Views: 848

Re: Prevent repeat triggering while using KeyWait command Topic is solved

Thank you very much for your reply.

It's almost what I require, but not quite. I would like the action to trigger on key down, not on key up.

At the moment nothing happens while they key is held down. It's only when key is released is the action is triggered.
by Lem2001
17 Oct 2019, 17:42
Forum: Ask for Help (v1)
Topic: Prevent repeat triggering while using KeyWait command Topic is solved
Replies: 6
Views: 848

Prevent repeat triggering while using KeyWait command Topic is solved

I'm using the following command to trigger an action on a long key press of F12. F12:: KeyWait, F12, T0.6 if A_TimeSinceThisHotkey >= 500 ; in milliseconds However, I want the F12 key to fire off only once per key press (even if it's held down) instead of it repeatedly triggering while the key is be...
by Lem2001
23 Jun 2019, 17:37
Forum: Ask for Help (v1)
Topic: Problem using Timers Topic is solved
Replies: 2
Views: 643

Re: Problem using Timers Topic is solved

Thank you.

That fixed it. They both work at the same time now.
by Lem2001
23 Jun 2019, 16:08
Forum: Ask for Help (v1)
Topic: Problem using Timers Topic is solved
Replies: 2
Views: 643

Problem using Timers Topic is solved

I have a script with the following code in it (see below). It contains only 2 timers, and one hotkey. However, only one of the timers will work at a time (whichever one is written first in the script). I may have been a bit over-enthusiastic with my 'returns', but I just can't seem to find the probl...
by Lem2001
18 Jun 2019, 00:38
Forum: Ask for Help (v1)
Topic: Making Windows Explorer script also work in File Dialogs Topic is solved
Replies: 5
Views: 1166

Re: Making Windows Explorer script also work in File Dialogs Topic is solved

Thank you very much for the updated code (and helpful comments). I do appreciate it. Your code example works really well, but seeing as the icon sizes don't fit the views that I'm using, then the outcome is a bit of a case of one step forwards, two steps back. I guess I'll have to further trawl the ...
by Lem2001
17 Jun 2019, 05:38
Forum: Ask for Help (v1)
Topic: Making Windows Explorer script also work in File Dialogs Topic is solved
Replies: 5
Views: 1166

Re: Making Windows Explorer script also work in File Dialogs Topic is solved

Thank you very much for this! I didn't realise that it would involve such significant changes to the code in order to get it to work. I'm a very basic beginner-level AHK user, so I was unaware of the limitations of Shell.Application object with respect to dialogs. I have tested out your second examp...
by Lem2001
15 Jun 2019, 11:44
Forum: Ask for Help (v1)
Topic: Making Windows Explorer script also work in File Dialogs Topic is solved
Replies: 5
Views: 1166

Making Windows Explorer script also work in File Dialogs Topic is solved

I have been happily using the code below for many months (the source is credited in my comment) and it works wonderfully. However, I would like it to also work in File Dialogs. I changed the directive part of the code so that the hotkey is also detected in file dialogs (that was easy) but I don't un...
by Lem2001
14 Jun 2019, 05:28
Forum: Ask for Help (v1)
Topic: WinHide wihout Hotkey Topic is solved
Replies: 8
Views: 1543

Re: WinHide wihout Hotkey Topic is solved

That was easier than I thought.

It works great on the currently assigned name, so it should obviously be fine for any alternative.

Thank you!
by Lem2001
13 Jun 2019, 04:53
Forum: Ask for Help (v1)
Topic: WinHide wihout Hotkey Topic is solved
Replies: 8
Views: 1543

Re: WinHide wihout Hotkey Topic is solved

Hi, I've just discovered another issue. Today I started using my computer and the Listary object was back on all of my file dialogs. I had previously tested my script very thoroughly, and it had been working perfectly, so I had no idea what the problem could be. I then checked the object using Windo...
by Lem2001
11 Jun 2019, 16:25
Forum: Ask for Help (v1)
Topic: WinHide wihout Hotkey Topic is solved
Replies: 8
Views: 1543

Re: WinHide wihout Hotkey Topic is solved

unfortunately not, see: https://www.autohotkey.com/docs/Language.htm#not-control-flow #IfWinExist can't trigger anything. Wow, thanks for this! I don't know how I have not seen this before. I have spent so much time in the past trying to get this to work, and I assumed that it was my bad code writi...

Go to advanced search