Posts: 116
Threads: 19
Joined: Nov 2006
Hello Gin, bro i just have 1 last question for you.
I have a ToolBar that opens with Mutiple Windows, and on it the toolbar has several macros and all of these macros run on a window with the same class and name i want to stop all functions without stoping the 1s that are running on the other window. ill show you the code and then go more into detail so that you completly understand.
TOOLBAR CODE
Window Functions :mac "Function" "" GetWindow(TriggerWindow GW_OWNER)
Stop Functions On Window:SetProp(GetWindow(TriggerWindow GW_OWNER) "Function" 0)
FUNCTION
int w1;err
w1=win("Excel");err
act w1;err
hid w1;err
hid- w1;err
SetProp(w1 "FUNCTION" 1)
spe 15
rep
,if(!GetProp(w1 "FUNCTION")) end
wait 3
act w1
WITH THESE CODES IT ONLY SHUTS DOWN THE ONE FUNCTION, I WANT TO MAKE IT SO THAT IF I PUSH THE STOP BUTTON IT STOPS ALL FUNCTIONS RUNNING FROM THAT TOOLBAR, WITHOUT STOPING ANY FUNCTIONS FROM THE OTHER TOOLBAR, I CAN DO IT FROM THAT TOOLBAR BUT I WOULD HAVE TO MAKE 10 MORE BUTTONS AND I DONT WANT TO DO IT THAT WAY SO IS THERE ANY WAY THAT YOU CAN STOP ALL FUNCTIONS INSTEAD OF 1 WITHOUT MAKING 10 STOP BUTTONS, BECAUSE THERE IS 10 FUNCTIONS THAT ARE IN THE 1 TOOLBAR TYVM BRO IF YOU WANT ME TO EXPLAIN IT SOME OTHER WAY THEN JUST SAY SO I HOPE THIS HELPS YOU :lol:
Posts: 1,769
Threads: 410
Joined: Feb 2003
what are the function names as they show in the "Threads" window?
Posts: 12,071
Threads: 140
Joined: Dec 2002
If there are many threads of single function, I think they all should stop. If different functions, add similar code in each of them. Of course this cannot be added to functions that do not repeat. Other way - for each window use functions with unique names, and use shutdown. I don't know other ways (i don't say it is impossible, maybe you will find a better way).
Posts: 116
Threads: 19
Joined: Nov 2006
Gintaras Wrote:If there are many threads of single function, I think they all should stop. If different functions, add similar code in each of them. Of course this cannot be added to functions that do not repeat. Other way - for each window use functions with unique names, and use shutdown. I don't know other ways (i don't say it is impossible, maybe you will find a better way). if i use shutdown -6 0 "Function" then it shuts down all macros that are running. is there a way to shut down all functions and macros running off that toolbar?
Posts: 116
Threads: 19
Joined: Nov 2006
ken gray Wrote:what are the function names as they show in the "Threads" window? the functions names are Function_A , Function_B ,,,, ect to 10
Posts: 116
Threads: 19
Joined: Nov 2006
what i want to do is stop all functions running from the toolbar with out stoping other functions running cause 3 functions can be running at the same time, do you get my drift?
ty
Posts: 1,769
Threads: 410
Joined: Feb 2003
maybe i'm misunderstanding but if you have a bunch of toolbars with different functions assigned to them that have different names than the functions in the other toolbars, can't you create a function that does a "shutdown" of all of that toolbar's function regardless of whether they are running or not?
Posts: 116
Threads: 19
Joined: Nov 2006
ken gray Wrote:maybe i'm misunderstanding but if you have a bunch of toolbars with different functions assigned to them that have different names than the functions in the other toolbars, can't you create a function that does a "shutdown" of all of that toolbar's function regardless of whether they are running or not? all of the toolbars are triggered to open with a window, and i have 2 of the same windows open at the same time right, so when im running a function from my toolbar on window 1 then i have the same same function running on the other window... i can shut off just the 1 function from that toolbar but ..... i cant shut off my other functions without using shutdown,,, but if i use shutdown then it stops all functions from both toolbars and i only want it to stop all functions from the toolbar its running on.
Posts: 1,769
Threads: 410
Joined: Feb 2003
ok....now, i'm getting it....what are the program windows? maybe there's something there we can work with.
Posts: 116
Threads: 19
Joined: Nov 2006
Window Functions 2:mac "Function2" "" GetWindow(TriggerWindow GW_OWNER)
Window Functions3 :mac "Function3" "" GetWindow(TriggerWindow GW_OWNER)
Window Functions 4:mac "Function1" "" GetWindow(TriggerWindow GW_OWNER)
Stop Functions On Window:SetProp(GetWindow(TriggerWindow GW_OWNER) "Function1" 0)
Stop Functions On Window:SetProp(GetWindow(TriggerWindow GW_OWNER) "Function2" 0)
Stop Functions On Window:SetProp(GetWindow(TriggerWindow GW_OWNER) "Function3" 0)
i could do it this way, but i dont want to have 10 buttons to stop just 1 function get my drift?
Posts: 116
Threads: 19
Joined: Nov 2006
ken gray Wrote:ok....now, i'm getting it....what are the program windows? maybe there's something there we can work with. the programs windows are Excel
Posts: 12,071
Threads: 140
Joined: Dec 2002
I was thinking it is PartyPoker. What these 10 functions do in Excel?
Posts: 116
Threads: 19
Joined: Nov 2006
Gintaras Wrote:I was thinking it is PartyPoker. What these 10 functions do in Excel? its for my work, the toolbar is up top like yours on QM, each function uses set and get text, and other complicated strings and functions, there hard to explain, the functions are used to type text into boxes because i get paid for graphing. I dont use PartyPoker, would never break your rules. if u didnt no, u can make functions in excel 2 lol
Posts: 12,071
Threads: 140
Joined: Dec 2002
Mr____B Wrote:Window Functions 2:mac "Function2" "" GetWindow(TriggerWindow GW_OWNER)
Window Functions3 :mac "Function3" "" GetWindow(TriggerWindow GW_OWNER)
Window Functions 4:mac "Function1" "" GetWindow(TriggerWindow GW_OWNER)
Stop Functions On Window:SetProp(GetWindow(TriggerWindow GW_OWNER) "Function1" 0)
Stop Functions On Window:SetProp(GetWindow(TriggerWindow GW_OWNER) "Function2" 0)
Stop Functions On Window:SetProp(GetWindow(TriggerWindow GW_OWNER) "Function3" 0)
i could do it this way, but i dont want to have 10 buttons to stop just 1 function get my drift?
It does not stop all functions because you use different strings ("Function1", "Function2", ...) with SetProp/GetProp. Use single string everywhere. It can be any string.
Posts: 116
Threads: 19
Joined: Nov 2006
Gintaras Wrote:Mr____B Wrote:Window Functions 2:mac "Function2" "" GetWindow(TriggerWindow GW_OWNER)
Window Functions3 :mac "Function3" "" GetWindow(TriggerWindow GW_OWNER)
Window Functions 4:mac "Function1" "" GetWindow(TriggerWindow GW_OWNER)
Stop Functions On Window:SetProp(GetWindow(TriggerWindow GW_OWNER) "Function1" 0)
Stop Functions On Window:SetProp(GetWindow(TriggerWindow GW_OWNER) "Function2" 0)
Stop Functions On Window:SetProp(GetWindow(TriggerWindow GW_OWNER) "Function3" 0)
i could do it this way, but i dont want to have 10 buttons to stop just 1 function get my drift?
It does not stop all functions because you use different strings ("Function1", "Function2", ...) with SetProp/GetProp. Use single string everywhere. It can be any string. ok ty bro, ill try it out and get back to u, so it looks like this? Stop Functions On Window:SetProp(GetWindow(TriggerWindow GW_OWNER) "Function3""function2" 0)
Posts: 12,071
Threads: 140
Joined: Dec 2002
No. With all SetProp and GetProp, use "x" instead of "FUNCTION", "Function1", etc.
Posts: 116
Threads: 19
Joined: Nov 2006
ok, so put it into a variable? or a string? lol sorry i just got lost, can u show me an example ty
Posts: 116
Threads: 19
Joined: Nov 2006
Mr____B Wrote:ok, so put it into a variable? or a string? lol sorry i just got lost, can u show me an example ty lmfao nvm i got it tyvm bro it works great! cant belive i didnt try that im so stupid!!
|