Search found 81 matches

by Lem2001
Yesterday, 23:32
Forum: Ask For Help
Topic: MsgBox, Modality and Ownership
Replies: 0
Views: 26

MsgBox, Modality and Ownership

I've created a MsgBox for an existing program (it's simple Yes / No dialog that displays in response to a key press). I've got the msgbox all set up how I want it (Icon, title, code that's run when Yes or No is pressed) and it works perfectly, but I have a few questions: I'd ideally like my MsgBox d...
by Lem2001
Yesterday, 18:55
Forum: Ask For Help
Topic: Disable certain keys for short period of time Topic is solved
Replies: 7
Views: 90

Re: Disable certain keys for short period of time Topic is solved

Your example is basically how I started off, but when it didn't work (it kept throwing errors) I knew I must have done something wrong, so I started changing things in an attempt to fix whatever the mistake was (which just made things worse). So after you provided a full working code example (based ...
by Lem2001
Yesterday, 17:10
Forum: Ask For Help
Topic: Problems with flow control (can't get 2 pieces of code to coexist) Topic is solved
Replies: 5
Views: 107

Re: Problems with flow control (can't get 2 pieces of code to coexist) Topic is solved

I've now read through the post and tested both versions of the code, and they both work perfectly! Thank you. I really appreciate you clear breakdown of what the issue was and why the code was executing in the way that it did.Your explanation really made it obvious where I had messed up. I like your...
by Lem2001
Yesterday, 16:49
Forum: Ask For Help
Topic: Problems with flow control (can't get 2 pieces of code to coexist) Topic is solved
Replies: 5
Views: 107

Re: Problems with flow control (can't get 2 pieces of code to coexist) Topic is solved

boiler Thanks very much for your detailed reply. I'm carefully looking through it now. You're right about the duplication (seeing as only the file dialog names and the control name differ) but I didn't know how else to make the correct control be chosen for the correct dialog type. I'll let you kno...
by Lem2001
Yesterday, 16:45
Forum: Ask For Help
Topic: Problems with flow control (can't get 2 pieces of code to coexist) Topic is solved
Replies: 5
Views: 107

Re: Problems with flow control (can't get 2 pieces of code to coexist) Topic is solved

In addition, ("Add ahk_class #32770") doesn't seem like it would do much as an expression by itself. I think you'll want that to be part of a function such as WinActive. If you're trying to do the Save after something happens in the preceding block, then you'll need to account for that in the codin...
by Lem2001
Yesterday, 13:01
Forum: Ask For Help
Topic: Problems with flow control (can't get 2 pieces of code to coexist) Topic is solved
Replies: 5
Views: 107

Problems with flow control (can't get 2 pieces of code to coexist) Topic is solved

I've created a hotkey that carries out different actions depending on the dialog type (Open/Add or Save/Extract). Each block of code works fine if it's run separately, but I can't get them to coexist. The second one will always fail. How can I integrate the two so that they both work together? ~Ctrl...
by Lem2001
Yesterday, 07:01
Forum: Ask For Help
Topic: Disable certain keys for short period of time Topic is solved
Replies: 7
Views: 90

Re: Disable certain keys for short period of time Topic is solved

Thanks for your example. I'm now using the label correctly and its not causing any error message. My code now disables the Enter key successfully, but I only want it disabled for 1000ms before its enabled again. I can't figure out where to put the Hotkey, Enter, Off command to re-enable it. I was tr...
by Lem2001
22 Oct 2020, 21:54
Forum: Ask For Help
Topic: Hotkey to toggle window size Topic is solved
Replies: 13
Views: 246

Re: Hotkey to toggle window size Topic is solved

Success! :dance: I temporarily changed the timer to 1 minute so that I could more quickly see the changes when viewing the array count. The count was retained after all windows were closed, and then a minute later the array count was back at zero. My reason for asking about the separation of the fun...
by Lem2001
22 Oct 2020, 20:07
Forum: Ask For Help
Topic: Hotkey to toggle window size Topic is solved
Replies: 13
Views: 246

Re: Hotkey to toggle window size Topic is solved

OK, it's finally working! I have multiple declarations in my hotkey script for various different programs. I literally put the ToggleStates := {} outside of the declaration for ahk_exe codepad.exe (above it), but it still wasn't working. So then I moved it right up to the very start of the script an...
by Lem2001
22 Oct 2020, 19:41
Forum: Ask For Help
Topic: Hotkey to toggle window size Topic is solved
Replies: 13
Views: 246

Re: Hotkey to toggle window size Topic is solved

Jim Dunn wrote:
22 Oct 2020, 19:36
You don't need n := 0 because new windows will return "false" when the array is checked, which equates.
You do, however, need the array declaration ToggleStates : = {} which you removed. ;)
My amazing coding skills are on full display :lol:

Let me try again. I'll get back to you.
by Lem2001
22 Oct 2020, 19:23
Forum: Ask For Help
Topic: Hotkey to toggle window size Topic is solved
Replies: 13
Views: 246

Re: Hotkey to toggle window size Topic is solved

I just wrote out a post explaining that it seems to be working great, but it turns out that I was mistaken. In your last code example, you left out the n=0 (maybe that's just because you were only focussing on the actual hotkey code). Is it not needed now because the array is keeping track compared ...
by Lem2001
22 Oct 2020, 18:11
Forum: Ask For Help
Topic: Disable certain keys for short period of time Topic is solved
Replies: 7
Views: 90

Re: Disable certain keys for short period of time Topic is solved

Use the Hotkey command to turn hotkeys on and off dynamically. I want to disable actual keys (specifically the 'Enter' key, the 'Delete' and all 4 Arrow keys) not a hotkey combination like ^c or whatever. As far as I can tell (having now just read the Hotkey section in the help file) it does not se...
by Lem2001
22 Oct 2020, 17:39
Forum: Ask For Help
Topic: Hotkey to toggle window size Topic is solved
Replies: 13
Views: 246

Re: Hotkey to toggle window size Topic is solved

Thank you very much for your detailed and helpful reply. The first toggle part works fine (now that I removed the %). Restricting this action to only the program in question is something that even I can manage to do, so we're good on that score too, thanks. However, with regards to the "getting out ...
by Lem2001
22 Oct 2020, 15:56
Forum: Ask For Help
Topic: Disable certain keys for short period of time Topic is solved
Replies: 7
Views: 90

Disable certain keys for short period of time Topic is solved

How do I disable specific keys (within a subroutine) for a short period of time?

I thought it would be easy and I could do something simple like:

{
del::return
Sleep 2000
del::del
}

But that does not work; the key is permanently disabled.Its function never gets restored.
by Lem2001
20 Oct 2020, 23:24
Forum: Ask For Help
Topic: Hotkey to toggle window size Topic is solved
Replies: 13
Views: 246

Hotkey to toggle window size Topic is solved

I'm want to make hotkey to toggle a change in window size (for one specific program, not all windows). I didn't know how to retain a toggle state, but I found some code which works well: //autohotkey.com/board/topic/68710-autohotkey-toggle-state-function/?p=434956 n=0 ; this isn't really needed, the...
by Lem2001
20 Oct 2020, 17:03
Forum: Ask For Help
Topic: Edit control in GUI keeps selecting text Topic is solved
Replies: 3
Views: 55

Re: Edit control in GUI keeps selecting text Topic is solved

@boiler

This works perfectly! Thank you very much.
by Lem2001
19 Oct 2020, 19:31
Forum: Ask For Help
Topic: Edit control in GUI keeps selecting text Topic is solved
Replies: 3
Views: 55

Edit control in GUI keeps selecting text Topic is solved

I made a simple GUI page that has one text field and one read-only edit field (with several lines of text in it that can be copied but not changed). If I run this as a script it works as expected, but when I compile it into an .exe and then run it all of the text in the read only edit control gets s...
by Lem2001
14 Oct 2020, 10:19
Forum: Ask For Help
Topic: Prevent a pop up dialog from displaying
Replies: 3
Views: 104

Prevent a pop up dialog from displaying

I'm running a program that pops up a dialog after a manual search has been done. I would like this pop up dialog to not be displayed at all. However, the dialog is modal, so it has to be closed (rather than just hidden) otherwise the rest of the user interface becomes inaccessible. I used WinWait to...
by Lem2001
21 May 2020, 21:42
Forum: Ask For Help
Topic: Appskey hotkey combinations
Replies: 5
Views: 303

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: 303

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

Go to advanced search