Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TS Menus not triggering
#1
I've been migrating my system onto a new Windows 8 installation (same computer, different drive). I believe I have QM 2.3.2.8 on the old Win 7 install, and downloaded and installed the latest QM 2.3.3.7 on Win 8. When I imported the old macros file, my TS menus no longer work. I just want to have shortcuts prefixed by "##" e.g. "##mpm" to type out email signatures, company name, phone number, etc. But no matter what I change the trigger to, whether keyboard or Text (TS menu), it doesn't work. I even tried creating the sample TS menu, and put in a simple beep response to see if it could audibly indicate it got the trigger. It just doesn't capture the trigger at all. I don't believe I have any anti key-logging software running, but I tried disabling my anti-virus just in case. Still no good. Any other ideas of what would prevent TS menus from working?

The slightly modified sample:
TS Menu sample TS Menu
Trigger $t     Help - how to add the trigger to the macro
Code:
Copy      Help
/b/i/c/p3

;just beep to let me know it's working
beep :bee

;SIMPLE TEXT EXAMPLES
sim :'"simple text" ;;inserts simple text when you type sim and postfix (Ctrl, space, comma, Enter...)
simp :"paste text" ;;same as above, but uses clipboard instead of keys

;FORMATTED TEXT EXAMPLES
dt :str s.timeformat("{DD} {T}"); key (s) ;;current date and time. To add the code, you can use the Text dialog from the floating toolbar.
inpn :if(inp(_i "a number")) key F"the number is {_i}" ;;manual text input

;POPUP LIST EXAMPLE
;If there are several matching items, shows a popup list. Select an item with mouse, Enter, Tab or a number key.
PL :'"list item 1"
PL :'"list item 2" ;;Label
#2
Try QM 2.3.4.
Also look in Options -> Triggers -> Active triggers -> Enabled -> TS menu. Must be selected.
#3
Selected/highlighted is enabled? Everything in the left list, "When QM enabled", including TS menus is selected.
#4
Did you try QM 2.3.4? Part of TS menu trigger code is changed in this version.
#5
This is interesting. When I type a shortcut in an Outlook email, it WORKS! But in notepad, it doesn't. I never put a program exclusion, let alone for notepad. Where could that coming be from?
#6
Maybe Notepad is 64-bit? Try in 32-bit Notepad, it runs when you launch it from QM macro: run "notepad.exe"
Normally all triggers work with 64-bit windows too, but something is different.

Also look in Options -> general -> UAC. Must not be User, because then triggers don't work with admin and uiAccess programs.

If you have Process Explorer, you can see 64-bit processes and admin/uiAccess processes (integrity level is High).
#7
I tried QM 2.3.4 now. No change.

It works in Outlook, OneNote, and Word,
does NOT work in either notepad or wordpad.
I have Office 2010 x64 installed on Win 8 x64. Not sure how to start notepad in 32 bit.

General->UAC was set as Administrator. Tried all three settings: Administrator, uiAccess, and User; no difference. Back to Administrator now.

I've had problems with several programs not running on Win 8 unless they're started as administrator. I didn't have to do that with QM, but I did have to give special permission to install.

Yes, there is something definitely different (strange) about notepad and wordpad.
#8
If there are 32 and 64 bit versions of System programs, 32-bit version will run if started from a 32-bit program, like QM. 64-bit - if started from 64-bit, like Windows Explorer.

Also try to turn off low level keyboard hook.

How keyboard triggers work in these programs? With low-level hook and without.
#9
I see that now. Notepad was 32 bit when started from QM, but goes back to 64 bit when started alone. Still no difference whether 32 or 64 as for whether TS menus work.

Looking at some of the other process details in task manager, for Operating system context, it lists Windows 8 for notepad and wordpad, but Windows 7 for Word, and OneNote and Outlook. qm.exe is Windows 7, and qmrun.exe and qmserve.exe are Windows Vista.

There's a UAC Virtualization column; that's Enabled only for qmrun.exe, and either disabled or not allowed for everything else.

Low level hook: tried keyboard off, and all off. No difference. Back to keyboard and mouse on, other off.
#10
How keyboard triggers work in these programs? They use the same hooks as TS menu triggers.
#11
I tried keyboard triggers early on. When I imported the macros file from the earlier version, it changed the trigger to a keyboard trigger. I tried both keyboard and TS menu triggers, and couldn't get it to work.
#12
How recording works? Try to record some keys, text and clicks.
#13
Back to this question...
I tried recording some keystrokes and mouse clicks in notepad, but it didn't record the keystrokes right. I thought it might be because of unicode, so I turned unicode off. It should be,
abcdef
ghijkl
<click maximize/restore button>
in both cases. It maximizes the window, but doesn't type the letters I did. Here is what it recorded:
Macro My First Macro2
Trigger SF9     Help - how to add the trigger to the macro
Code:
Copy      Help
;---- Recorded 2/4/2013 10:28:32 PM ----
int w1=act(win("Untitled - Notepad" "Notepad"))
'(255)(194)(255)(194)(255)(194)Y  ;; (255) F15 (255) F15 (255) F15 Enter
'(255)(194)(255)(194)(255)(194)Y  ;; (255) F15 (255) F15 (255) F15 Enter
lef 834 9 w1 ;;push button 'Maximise'
;---------------------------------------
;;---- Recorded 2/4/2013 10:24:58 PM ----
;int w1=act(win("Untitled - Notepad" "Notepad"))
;'(255)(194)(255)(194)(255)(194)Y  ;; (255) F15 (255) F15 (255) F15 Enter
;'(255)(194)(255)(194)(255)(194)Y  ;; (255) F15 (255) F15 (255) F15 Enter
;lef 1133 17 w1 ;;push button 'Restore'
;;---------------------------------------
#14
In Outlook, it recorded it correctly:
Macro My First Macro2
Trigger SF9     Help - how to add the trigger to the macro
Code:
Copy      Help
;---- Recorded 2/4/2013 10:50:01 PM ----
int w1=act(win("Untitled - Message (HTML) " "rctrl_renwnd32"))
'Y              ;; Enter
'"abcdef" Y     ;; "abcdef" Enter
'"ghijkl" Y     ;; "ghijkl" Enter
lef 818 11 w1 1 ;;property page 'Ribbon'
;---------------------------------------
#15
Please try this function. Make exe from it, exit QM, run exe. It records keys in the same way as QM would record. Does it record correct keys?

Function test_keyboard_hook
Code:
Copy      Help
;/exe
function nCode wParam KBDLLHOOKSTRUCT&h

if(getopt(nargs)=0)
,if(getopt(nthreads)>1) ret
,File-- f.Open("$desktop$\test_keyboard_hook.txt" "w")
,int keyhook=SetWindowsHookEx(WH_KEYBOARD_LL &test_keyboard_hook _hinst 0)
,mes "Now this macro is recording keys to $desktop$\test_keyboard_hook.txt, until you close this message box."
,f.Close
,run "$desktop$\test_keyboard_hook.txt"
,ret

;---- this code runs on each key down and up event -----

FormatKeyString h.vkCode 0 &_s
str s.format("%s %s%s" _s iif(h.flags&LLKHF_UP "up" "down") iif(h.flags&LLKHF_INJECTED ", injected" ""))
f.WriteLine(s)

ret CallNextHookEx(0 nCode wParam &h)

;BEGIN PROJECT
;main_function  test_keyboard_hook
;exe_file  $desktop$\test_keyboard_hook.exe
;icon  <default>
;manifest  $qm$\default.exe.manifest
;flags  6
;guid  {BC94C259-A195-47DB-B7B2-F7C6E8246C2B}
;END PROJECT
#16
Hey Gingaras,
I tried this compiled .exe without QM running as you said. It still records the strange/incorrect key codes, like this:
F15 down
(255) up
(255) down
(255) up
F15 down
(255) up
Enter down
Enter up
(255) down
(255) up
Again, sorry for not keeping up to date on this issue. It's not a serious problem, since I use key shortcuts mostly in MS apps, and rarely in notepad. But it's still an annoyance, and an unsolved mystery.
#17
Yes, mystery. Maybe some keyboard-related program, or spyware, or antispyware.


Forum Jump:


Users browsing this thread: 7 Guest(s)