Accessing a function in a program

Get help with using AutoHotkey and its commands and hotkeys
Joefango
Posts: 21
Joined: 05 Mar 2016, 07:36

Accessing a function in a program

11 May 2016, 06:45

Hello,

I would like to learn a bit more about send/post message to a program, I followed some tutos but I'm still at point zero after 2 days of tries.

First I want to "tell" the program to switch to another toolbar. After looking the messages with Spy++ it seems too complicated for me because a lot of messages I don't undestand..

Ok so I decided to try open the menu where I can find the function "switch toolbar". so I looked with Spy++ what's going on when I hit the AppsKey :

Spy++ log:

Code: Select all

<000569> 000000000004054A P WM_KEYDOWN nVirtKey:VK_APPS cRepeat:1 ScanCode:5D fExtended:1 fAltDown:0 fRepeat:0 fUp:0
<000570> 000000000004054A P WM_KEYUP nVirtKey:VK_APPS cRepeat:1 ScanCode:5D fExtended:1 fAltDown:0 fRepeat:1 fUp:1
<000571> 000000000004054A P WM_CONTEXTMENU hwnd:0004054A xPos:65535 yPos:65535
<000572> 0000000000190700 S WM_NCCREATE lpcs:0014F620
<000573> 0000000000190700 S WM_NCCALCSIZE fCalcValidRects:False lpncsp:0014F670
<000574> 0000000000190700 S WM_CREATE lpcs:0014F620
<000575> 0000000000190700 S WM_SIZE fwSizeType:SIZE_RESTORED nWidth:94 nHeight:94
<000576> 0000000000190700 S WM_MOVE xPos:3 yPos:3
<000577> 000000000004054A S WM_ENTERMENULOOP fIsTrackPopupMenu:True
<000578> 000000000004054A R WM_ENTERMENULOOP
<000579> 000000000004054A S WM_INITMENU hmenuInit:51DC0095
<000580> 000000000004054A R WM_INITMENU
<000581> 000000000004054A S WM_INITMENUPOPUP hmenuPopup:51DC0095 uPos:0 fSystemMenu:False
<000582> 000000000004054A R WM_INITMENUPOPUP
<000583> 0000000000190700 S message:0x01E2 [Inconnu] wParam:00000001 lParam:00000000
<000584> 000000000004054A S message:0x0093 [Inconnu] wParam:00000000 lParam:0014F660
<000585> 000000000004054A R message:0x0093 [Inconnu] lResult:00000001
<000586> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000587> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000588> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000589> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000590> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000591> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000592> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000593> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000594> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000595> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000596> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000597> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000598> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000599> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000600> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000601> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000602> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000603> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000604> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000605> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000606> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000607> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000608> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000609> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000610> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000611> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000612> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000613> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000614> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000615> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000616> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000617> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000618> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000619> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000620> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000621> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000622> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000623> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000624> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000625> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000626> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000627> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000628> 000000000004054A S message:0x0094 [Inconnu] wParam:00000000 lParam:0014F600
<000629> 000000000004054A R message:0x0094 [Inconnu] lResult:00000000
<000630> 0000000000190700 S WM_WINDOWPOSCHANGING lpwp:0014F650
<000631> 0000000000190700 S WM_NCCALCSIZE fCalcValidRects:True lpncsp:0014F620
<000632> 0000000000190700 S WM_WINDOWPOSCHANGED lpwp:0014F650
<000633> 0000000000190700 S WM_SIZE fwSizeType:SIZE_RESTORED nWidth:263 nHeight:424
<000634> 0000000000190700 S WM_WINDOWPOSCHANGING lpwp:0014F650
<000635> 0000000000190700 S WM_NCPAINT hrgn:00000001
<000636> 0000000000190700 S message:0x0095 [Inconnu] wParam:00000000 lParam:0014F660
<000637> 0000000000190700 S WM_ERASEBKGND hdc:1F01121C
<000638> 0000000000190852 S WM_NCCREATE lpcs:0014F620
<000639> 0000000000190852 S WM_NCCALCSIZE fCalcValidRects:False lpncsp:0014F670
<000640> 0000000000190852 S WM_CREATE lpcs:0014F620
<000641> 0000000000190852 S WM_SIZE fwSizeType:SIZE_RESTORED nWidth:0 nHeight:0
<000642> 0000000000190852 S WM_MOVE xPos:0 yPos:0
<000643> 0000000000190852 S WM_WINDOWPOSCHANGING lpwp:0014F650
<000644> 0000000000190852 S WM_WINDOWPOSCHANGED lpwp:0014F650
<000645> 0000000000190700 S WM_WINDOWPOSCHANGED lpwp:0014F650
<000646> 0000000000190700 S WM_MOVE xPos:1639 yPos:628
<000647> 0000000000190700 P WM_PAINT hdc:00000000
<000648> 0000000000190700 S message:0x0093 [Inconnu] wParam:00000000 lParam:0014F660
<000649> 0000000000190700 S message:0x0091 [Inconnu] wParam:00000000 lParam:0014F660
<000650> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000651> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000652> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000653> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000654> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000655> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000656> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000657> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000658> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000659> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000660> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000661> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000662> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000663> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000664> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000665> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000666> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000667> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000668> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000669> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000670> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000671> 0000000000190700 S message:0x0092 [Inconnu] wParam:00000000 lParam:0014F5E0
<000672> 000000000004054A S WM_ENTERIDLE fuSource:MSGF_MENU hwnd:00190700
<000673> 000000000004054A R WM_ENTERIDLE
Lot of messages here too and I don't know what to script now!...

Ok I decided to go with a basic send "AppsKey" to the window program but It's also not working

Code: Select all

DetectHiddenWindows, On
ControlSend,, {AppsKey}, ahk_class TLBHOST
return
Fourth, Maybe I will have to go through the old good method of right click at position,etc... Thanks if someone can help with that

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], boiler, Google [Bot], mikeyww and 41 guests