Posts: 12,074
Threads: 141
Joined: Dec 2002
Function
Paste_in_console
Trigger
Cv //Paste_in_console
;/
function# iid FILTER&f
if(wintest(f.hwnd "" "ConsoleWindowClass"))
,PostMessage f.hwnd WM_SYSCOMMAND 65521 0
,ret -1
ret -2
If does not work, check LL keyboard hooks in Options -> Triggers.
This is for Windows 2000 and later. Does not work on 98.
Posts: 44
Threads: 20
Joined: Apr 2008
Hi Gintaras
I tried the Paste_in_console function:
- I had to remove the first line (" /") to get the function to run
- When it did run, I got an error everytime I pressed Ctrl-V:
Error (RT) in "Paste_in_console /31"oPaste_in_console: invalid pointer
The cursor was on this line:
if(wintest(f.hwnd "" "ConsoleWindowClass"))
What am I doing wrong?
Cheers,
John
Posts: 12,074
Threads: 141
Joined: Dec 2002
I forgot to mention: it must be filter function. Open Properties dialog, Function properties tab, and check the checkbox.
Don't change anything else, especially trigger (Cv //Paste_in_console).
Posts: 44
Threads: 20
Joined: Apr 2008
Hi Gintaras
Sorry I'm a bit slow to pick this up. I've:
- Created a function called Paste_in_console
- Pasted in the code:
;/
function# iid FILTER&f
if(wintest(f.hwnd "" "ConsoleWindowClass"))
,PostMessage f.hwnd WM_SYSCOMMAND 65521 0
,ret -1
ret -2
- Set the keyboard hotkey to Ctrl+V, with Eat ticked.
- Ticked "This function is a filter function" in function properties.
My experience with the following setup is that pressing Ctrl-V does nothing in any window.
When I remove the first line (;/) in the function and press Ctrl-V in any window, I get the error: Error (RT) in "Paste_in_console /26"oPaste_in_console: invalid pointer
I am using QM 2.3.0.2
Regards,
John
Posts: 12,074
Threads: 141
Joined: Dec 2002
Paste
Cv //Paste_in_console
in Trigger field which is in main QM window, on toolbar.
Posts: 44
Threads: 20
Joined: Apr 2008
Thanks for your patience, Gintaras.
That worked well.
Cheers,
John