Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I want to use mouse event..
#1
Mouse trigger is not available in Exe....


ifm(WM_RBUTTONDOWN) do something....


I don't know how to deal with mouse event...
#2
You need a smart dialog. In the dialog editor, click Events and select WM_RBUTTONDOWN.
#3
I have a question along these lines, i have a function that is a window trigger the trigger for the window is // !cv"" "IEXPLORE" \\ is there a way to do this with window events.

about the only problem with exe is that you can not use window triggers if i was able to make a substitute for window triggers that would be great !!

P.S if this has already been talked about in another post im sorry iv been looking all over and have not seen anything on it

THANKS ALOT!

JOHN
#4
This is an alternative "created window" trigger that can be used in exe. You need to edit something.

Macro
Code:
Copy      Help
;This is an example.

mac "WE_CreatedWindowInstall" ;;launch "created window" triggers in new thread

;do other things ...

Function WE_CreatedWindowInstall
Code:
Copy      Help
function [off]

;Installs/uninstalls hooks that will call WE_CreatedWindowProc whenever an object is created.
;This function does not need to be modified.


int-- hook
if(off) if(hook) UnhookWinEvent(hook); hook=0
else
,if(getopt(nthreads)>1) mes "Already running. If in QM, use Threads dialog to end thread. If in exe, thread will end automatically." "" "i"; ret
,hook=SetWinEventHook(EVENT_OBJECT_CREATE EVENT_OBJECT_CREATE 0 &WE_CreatedWindowProc 0 0 WINEVENT_OUTOFCONTEXT)
,atend WE_CreatedWindowInstall 1
,opt waitmsg 1
,wait -1

Function WE_CreatedWindowProc
Code:
Copy      Help
;/WE_Main
function hhook event hwnd idObject idChild dwEventThread dwmsEventTime
if(!hwnd or idObject or idChild or GetWindowLong(hwnd GWL_STYLE)&WS_CHILD) ret

;This function is called whenever a window (hwnd) is created. Edit it.
;Must return as soon as possible. Must not execute any code that would
;interact with applications (instead use mac to start other macros).


;This code only shows what window is created
str sc.getwinclass(hwnd) st.getwintext(hwnd)
out "class=%s, text=%s" sc st

;;To filter windows and launch macros, here you can use code like this
;if(wintest(hwnd "window text" "window class" ...))

,;mac "some macro"
;else if(wintest(hwnd "window text" "window class" ...))

,;mac "another macro"
;...
#5
wow this is just! what i was looking for i only have two more "? / problems" .

1#
if i dont use the full text/title and class it does not see my window. also in one of my other post i had

("" "" "IEXPLORE" 0x400)
or
("" "" "IEXPLORE")

these dont seem to be working with this code

if(wintest(hwnd "" "" ...))
,mac "some macro"

maybe im just missing something small i hope thats it :oops: lol

2#
how do i pass the "hwnd" to the macro im running with mac " " to lets say run something like this

clo hwnd

in my macro/function... with window triggers you can use TriggerWindow as you know but that cant be done here



THANKS SO MUCH FOR YOUR TIME

JOHN
#6
1. Don't know, will look tomorrow.
2.

mac "macro" "" hwnd

Macro can be like this:
function hwnd
clo hwnd
#7
Yes, win("" "" "program") and wintest(hwnd "" "" "program") don't work in hook procedure, although work in other macros. I'll try to fix it. You can use this code instead:

str se.getwinexe(hwnd)
sel se 1
,case "IEXPLORE"
,mac "macro"


Forum Jump:


Users browsing this thread: 1 Guest(s)