Posts: 1,271
Threads: 399
Joined: Mar 2003
i use palemoon instead of firefox and test with SendKey instead of key
Function
f8sender
,act win("* - Pale Moon" "MozillaWindowClass" "" 0x5)
,key CQ
the keystroke is Ctrl + Page Down
http://support.mozilla.com/en-US/kb/Key ... ndows-tabs
in qm : key CQ
what is wrong with
Function
f8sender
,SendKey hwnd VK_CONTROL 1
,SendKey hwnd VK_NEXT
,SendKey hwnd VK_CONTROL 2
qm help says:
VK_NEXT 0x22 PAGE DOWN key
Posts: 1,271
Threads: 399
Joined: Mar 2003
and before i make any further mistakes,
my idea is to use SendKey for sending same keystroke to my browser and can continue to work on other stuff.
when using key then i can't do any other work, so my hope is that SendKey can be used to fire same keystroke again and again to hwnd in background.
or is that not working at all?
Posts: 12,030
Threads: 139
Joined: Dec 2002
Activate browser and run this
Macro
Macro1587
Trigger
F8
int hwnd=child
outw hwnd
SendKey hwnd VK_CONTROL 1
SendKey hwnd VK_NEXT
SendKey hwnd VK_CONTROL 2
If it does not work, it will not work. If works, outw tells you to what window to send.
Posts: 1,271
Threads: 399
Joined: Mar 2003
thanks. turns out that something is wrong with the way the programmer compiled palemoon.
i now use official firefox again.
Posts: 12,030
Threads: 139
Joined: Dec 2002
Do you use this SendKey?
int m1 m2 lp=MapVirtualKey(vk 0)<<16|1 ;;should be Ex with HKL of hwnd, although probably nobody will use it
sel(vk) case [3,33,34,35,36,37,38,39,40,44,45,46,91,92,93,111,144,VK_RCONTROL,VK_RMENU] lp|0x1000000 ;;ek
if(flags&3|2) PostMessage hwnd WM_KEYDOWN vk lp
if(flags&3|1) PostMessage hwnd WM_KEYUP vk lp|0xC0000000
It does not support Ctrl Shift etc. Posts key messages, but does not set key state. Somewhere here should be better version, SendKeysToWindow.
Posts: 1,271
Threads: 399
Joined: Mar 2003
need to adjust my scripts before testing. now using two firefox version (3.6 and 8.0), will give feedback soon.