Search found 63 matches

by Lem2001
21 May 2020, 21:42
Forum: Ask For Help
Topic: Appskey hotkey combinations
Replies: 5
Views: 283

Re: Appskey hotkey combinations

I appreciate your warning about AHK versions. I was running v1.1.30.03. This also explains why I found nothing for "Switch" when I searched in the AHK help file. I've now upgraded to v1.1.32.00 and the code works. Thank you! There are a couple of issues that I'd be grateful for some help with. 1. In...
by Lem2001
21 May 2020, 02:39
Forum: Ask For Help
Topic: Appskey hotkey combinations
Replies: 5
Views: 283

Re: Appskey hotkey combinations

Hallo, only the First Method. You can implement the Second Method in a similar way. ~Appskey & `;:: Input, Key, L1 Switch, Key { Case "n":Run, Notepad.exe Case "c":Run, Calc.exe Case "w":Run, Wordpad.exe } Return Thanks for your reply. When I try to run your example code I get an error about the li...
by Lem2001
15 May 2020, 22:43
Forum: Ask For Help
Topic: Appskey hotkey combinations
Replies: 5
Views: 283

Appskey hotkey combinations

I'd like to have the Appskey act as a modifier when it is pressed in combination with other keys, while still retaining its native context-menu function when it's pressed (and released) on its own. There are two types of ways that I'd like to use it: 1. First Method I would like to hold down the App...
by Lem2001
11 May 2020, 06:54
Forum: Ask For Help
Topic: User Home Path environment variable Topic is solved
Replies: 4
Views: 238

Re: User Home Path environment variable Topic is solved

Hi gregster, This works great, although you added ":\Users" which breaks the command (because the Homepath variable already contains the full path minus the drive letter). Therefore, the command that works is this: EnvGet, hdrive, Homedrive EnvGet, hpath, Homepath FileDelete % hdrive hpath "\junk.tx...
by Lem2001
11 May 2020, 05:47
Forum: Ask For Help
Topic: User Home Path environment variable Topic is solved
Replies: 4
Views: 238

User Home Path environment variable Topic is solved

I need to delete a file from the Home folder of the current user. Windows has the environment variables %HomeDrive% and %HomePath% that can be used to construct the correct path, but AHK has no equivalent A_HomeDrive and A_HomePath. What is the correct syntax to use for a FileDelete command if I wan...
by Lem2001
21 Mar 2020, 19:05
Forum: Ask For Help
Topic: WinWaitClose blocking script
Replies: 2
Views: 275

WinWaitClose blocking script

I'm having an issue with WinWaitClose that I could use some help with. I'm trying to create a basic script that uses an If / else type of structure, and within the 'if' part there is a WinWaitClose command that should only apply if the specified 'If' criteria are met. However, I've found that the Wi...
by Lem2001
21 Mar 2020, 12:40
Forum: Ask For Help
Topic: Deleting sub-folders and files Topic is solved
Replies: 4
Views: 422

Re: Deleting sub-folders and files Topic is solved

Sorry, my mistake. Should have used FileRemoveDir with the 1 (recurse) option: Thank you for the correction. It now works exactly as intended. You would loop through your array values within your file loop and compare them to A_LoopFileName, like this: I appreciate you writing out an example in ful...
by Lem2001
21 Mar 2020, 01:30
Forum: Ask For Help
Topic: Deleting sub-folders and files Topic is solved
Replies: 4
Views: 422

Re: Deleting sub-folders and files Topic is solved

Thanks. Should this work even if the sub-folders contain content, or does it require R for recurse? I ask because I replaced the path in your example with my test path but nothing is happening. I did try adding R just in case, but still nothing. I literally just pasted my path over your example path...
by Lem2001
20 Mar 2020, 20:43
Forum: Ask For Help
Topic: Deleting sub-folders and files Topic is solved
Replies: 4
Views: 422

Deleting sub-folders and files Topic is solved

1. How do I delete only sub-folders from a specified folder? (without having to name all the sub-folders individually and use FileRemoveDir for each one). 2. Is there a way to specify exceptions to a file *.* delete command? (in other words: delete all files in a folder except for certain named fil...
by Lem2001
16 Mar 2020, 21:28
Forum: Ask For Help
Topic: Problem using a modifier key (on its own) as a hotkey
Replies: 4
Views: 436

Re: Problem using a modifier key (on its own) as a hotkey

I tested using the provided script, and my key codes are the same as yours. I then tried the two alternative codes, but they resulted in the same problem. I don't think this issue can be solved because of the stupid way that the TrackPad invokes the Show Desktop feature. If anything is done to affec...
by Lem2001
16 Mar 2020, 08:35
Forum: Ask For Help
Topic: Problem using a modifier key (on its own) as a hotkey
Replies: 4
Views: 436

Re: Problem using a modifier key (on its own) as a hotkey

Thank you very much for your reply, Rohwedder. This works, but there are a couple of issues for me (one minor, one major). 1. I'd ideally like to have a shorter delay if the Start Menu has focus (not the whole Taskbar, just ahk_class DV2ControlHost ) because it feels weird having to long-press to cl...
by Lem2001
16 Mar 2020, 00:03
Forum: Ask For Help
Topic: Problem using a modifier key (on its own) as a hotkey
Replies: 4
Views: 436

Problem using a modifier key (on its own) as a hotkey

I use a lot of hotkey combinations that include the Win key . But if I don't press the keys carefully then the Win key can get accidentally pressed on its own (which opens the Start Menu and grabs focus from whatever program I'm using). This is annoying. To deal with this problem, I wanted to make s...
by Lem2001
14 Mar 2020, 14:29
Forum: Ask For Help
Topic: Win Key long-press problem Topic is solved
Replies: 2
Views: 325

Re: Win Key long-press problem Topic is solved

Thanks for letting me know that it works for you.

This confirmed that it was not a key-specific issue, but was instead something on my system.
I went back and checked my code and found another part of a script that was interfering with it.

It's working now.
by Lem2001
13 Mar 2020, 16:16
Forum: Ask For Help
Topic: Win Key long-press problem Topic is solved
Replies: 2
Views: 325

Win Key long-press problem Topic is solved

I have the code example below which works fine: F7:: KeyWait,F7 if A_TimeSinceThisHotkey >= 700 ; in milliseconds. MsgBox,Long Keypress. else MsgBox,Short Keypress. return However, I would like to do the same using the Win Key. But if I simply substitute LWin for F7 in the example above, it does not...
by Lem2001
13 Mar 2020, 16:09
Forum: Ask For Help
Topic: Different actions on Short-press and Long-press of hotkey Topic is solved
Replies: 4
Views: 444

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

Wow this is amazing, Rohwedder. You have taken into account all of my criteria, and it works exactly as I requested. Thank you so much! The $ sign and {Blind} were two of the things that I had overlooked in my code attempts (I am not familiar with them). Seeing as this solution works so well, I woul...
by Lem2001
13 Mar 2020, 11:32
Forum: Ask For Help
Topic: Different actions on Short-press and Long-press of hotkey Topic is solved
Replies: 4
Views: 444

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
Topic: Retaining a text file's existing ANSI or Unicode format after editing
Replies: 1
Views: 268

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
Topic: Edit text within an .ini file Topic is solved
Replies: 13
Views: 1467

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
Topic: Edit text within an .ini file Topic is solved
Replies: 13
Views: 1467

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...

Go to advanced search