Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Paste in console windows using Ctrl+V
#1
Function Paste_in_console
Trigger Cv //Paste_in_console     Help - how to add the trigger to the macro
Code:
Select All      Help
;/
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.
Reply
#2
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
Reply
#3
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).
Reply
#4
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
Reply
#5
Paste

Cv //Paste_in_console

in Trigger field which is in main QM window, on toolbar.
Reply
#6
Thanks for your patience, Gintaras.
That worked well.
Cheers,
John
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)