Posts: 60
Threads: 24
Joined: Jan 2008
Ok basically i want my functions to run on the window the toolbar is on.
anyway of qm getting window the toolabr is on?
somthing like that

thanks.
Posts: 26
Threads: 6
Joined: Mar 2008
int w1
w1=win("notepad")
act w1
as long as you have the tool bar on that window it will run that function on that window and u can open and use other notepads
Posts: 60
Threads: 24
Joined: Jan 2008
Yea man. i use this. but when i have 2windows with almost the same name. it messes up.
i need all my functions to run on the specific window the toolbar is on.

hock:
:oops:
thanks
Posts: 473
Threads: 33
Joined: Aug 2007
Maybe try naming the windows as they appear?
Taking on Quick Macros one day at a time
Posts: 26
Threads: 6
Joined: Mar 2008
how would i do that because i tryed it to get name and and setvalue into "edit" part of my dialog but it will add the new window to all :| ty
Posts: 473
Threads: 33
Joined: Aug 2007
I believe this question has been asked before, or something similar to it.
RUNNING DIFFERENT FUNCTIONS IN MULTIPLE WINDOWS
Taking on Quick Macros one day at a time
Posts: 60
Threads: 24
Joined: Jan 2008
Hey,
this helped me loads, but then again i installed a newer version of qm (2.2.1.)
And this doesnt seem to work?
Could you come up with a fix of this?
Thanks
Posts: 473
Threads: 33
Joined: Aug 2007
What doesn't work now?
Taking on Quick Macros one day at a time
Posts: 60
Threads: 24
Joined: Jan 2008
i get a "Window not found." error?
Posts: 473
Threads: 33
Joined: Aug 2007
When you use this?
Macro ( Macro )
str s="Window 1"
s.setwintext(win("Quick Macros"))
act s
Remember that once you change the window name, you'll have to activate it or label it by its new name and not its old one.
Taking on Quick Macros one day at a time
Posts: 60
Threads: 24
Joined: Jan 2008
Ohhh,
sorry bro my mistake i ment the otherone you helped me with
Example:
Menu2 :int+ g_tbwindow=GetWindow(val(_command) GW_OWNER); mac "Menu2"
after installing newer QM
i always get that error "Window not found"
Posts: 473
Threads: 33
Joined: Aug 2007
Not sure why.
Taking on Quick Macros one day at a time
Posts: 12,140
Threads: 142
Joined: Dec 2002
Now use GetToolbarOwner instead of GetWindow.
http://www.quickmacros.com/help/User/IDP_QMDLL.html
I had to change this because of problems on Vista.
Posts: 60
Threads: 24
Joined: Jan 2008
ok gin.
i tried this and i get an error.
Menu :int+ g_tbwindow=GetToolbarOwner(val(_command) GW_OWNER); mac "Menu" * $qm$\close.ico * 0
Error in Toolbar: too many arguments.
Posts: 12,140
Threads: 142
Joined: Dec 2002
Posts: 60
Threads: 24
Joined: Jan 2008
But this worked perfect with GetWindow.
reccomend anything gin?
Posts: 1,271
Threads: 399
Joined: Mar 2003
GetToolbarOwner expects only one argument.
Posts: 60
Threads: 24
Joined: Jan 2008
Sao, theres no way round this :?:
Posts: 1,271
Threads: 399
Joined: Mar 2003
TYL3R B™ Wrote:Sao, theres no way round this :?: 
it seems that you don't understand the code at all.
GetToolbarOwner(val(_command) GW_OWNER);
GW_OWNER is the second argument.