Skip to content
This repository
Browse code

- Fixed Preferences focus (so first hotkey isn't cleared as soon as w…

…indow is activated)

- Disabled the hotkey loop when AutoHotkey class windows are active, which is necessary for the Preferences GUI to work correctly (not a great solution). Might want to be more selective, depending on whether or not it seems worthwhile to allow replacements in Management or Newkey GUIs.
  • Loading branch information...
commit 9c6a953e12fb525d56b6620ff3b5d8821325ded1 1 parent 9c9a5e9
authored
2  TODO.txt
@@ -8,7 +8,7 @@ Features/fixes for 0.6 release:
8 8
 	x Fix CD drive error (need new, innocuous SC key that doesn't conflict with anything) -- Dustin's new trigger method fixes this
9 9
 	- Mouse incompatibility with Outlook?
10 10
 	- Need to change import/export format - just readline rather than use .ini - .ini too intense, opens and closes file with each read
11  
-	- Set focus on Preferences so On-the-fly shortcut doesn't immediately blank out to "None"
  11
+	x Set focus on Preferences so On-the-fly shortcut doesn't immediately blank out to "None"
12 12
 	
13 13
 - Features:
14 14
 	- Define custom hotkey
3  includes/GUI/preferences_GUI.ahk
... ...
@@ -1,7 +1,7 @@
1 1
 PREFERENCES:
2 2
 Gui,3: Destroy
3 3
 Gui,3: +owner2
4  
-Gui,3: Add, Tab,x5 y5 w306 h280,General|Print|Stats ;|Import|Export Add these later
  4
+Gui,3: Add, Tab,x5 y5 w306 h280 vTabs,General|Print|Stats ;|Import|Export Add these later
5 5
 IniRead,otfhotkey,texter.ini,Hotkey,OntheFly
6 6
 Gui,3: Add,Text,x10 y40,On-the-Fly shortcut:
7 7
 Gui,3: Add,Hotkey,xp+10 yp+20 w100 vsotfhotkey, %otfhotkey%
@@ -44,6 +44,7 @@ Gui,3: Add,Text,x25 y100,Hours saved:             %time_saved% (assuming 400 cha
44 44
 ;Gui,3: Add,Button,x230 y200 w75 GSETTINGSCANCEL,&Cancel
45 45
 Gui 2:+Disabled
46 46
 Gui,3: Show,,Texter Preferences
  47
+GuiControl,3: Focus, Tabs
47 48
 Return
48 49
 
49 50
 SETTINGSOK:
1  includes/functions/MonitorWindows.ahk
... ...
@@ -1,5 +1,6 @@
1 1
 MonitorWindows:
2 2
 WinGet CurrWinID, ID, A
  3
+WinGetClass, CurrWinClass, A
3 4
 ;Tooltip, CurrWinID= %CurrWinID% ~ PrevWinID= %PrevWinID%
4 5
 if (CurrWinID <> PrevWinID)
5 6
 {
6  texter.ahk
@@ -39,7 +39,7 @@ SetTimer, MonitorWindows, 500
39 39
 Loop
40 40
 {
41 41
   ;wait for a matching hotstring
42  
-  if (Disable = 1)
  42
+  if (Disable = 1 || CurrWinClass = "AutoHotkeyGUI")
43 43
   {
44 44
 		continue
45 45
   }
@@ -47,7 +47,7 @@ Loop
47 47
   {
48 48
 	  Loop
49 49
 	  { ;grab input one character at a time looking for a match
50  
-		if (Disable = 1)
  50
+		if (Disable = 1 || CurrWinClass = "AutoHotkeyGUI")
51 51
 		{
52 52
 			break
53 53
 		}
@@ -74,7 +74,7 @@ Loop
74 74
   }
75 75
   else
76 76
   { ;get a single character of input to look for triggers
77  
-    Transform, CtrlC, Chr, 3
  77
+    Transform, CtrlC, Chr, 3  ; used for the Ctrl-C check
78 78
     Input, UserInput, L1 M, %EndKeys%
79 79
 		;Tooltip, ErrorLevel= %ErrorLevel%, 10, 10
80 80
 	;msgbox %userinput%

0 notes on commit 9c6a953

Please sign in to comment.
Something went wrong with that request. Please try again.