Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gin need help please!!
#1
I can't seem 2 be able 2 rest global variables>I tried using atend that wouldn't work>any ideas?
#2
here's how you can do it.


str+ a
a="test value"
out a
a=""
out a
An old blog on QM coding and automation.

The Macro Hook
#3
Ken that won't work i need 2 reset the variable when the macro ends
#4
you mean at the end of the code or even if something kills it?

post your code and i can tell you where to put it.
An old blog on QM coding and automation.

The Macro Hook
#5
int i n=EnumQmThreads(0 0 0 0)
QMTHREAD* a._new(n)
for i 0 EnumQmThreads(a n 0 0)
,if _s.getmacro(a[i].qmitemid 1)="Function1"
,,int x
,,x+1
if x=1
,str+ cf
,cf=w1
if x=2
,str+ cf2
,cf2=w1
if x=3
,str+ cf3
,cf3=w1
if x=4
,str+ cf4
,cf4=w1
this is the code i am using
what i need it 2 do is reset only the global that is working in this function.but keep in mind there may be 4 or more instances of this function running at the same time
#6
any idea's on how 2 reset the variable when the function ends?
#7
Gintaras dou think u can help from the example i have give above how can i reset the var
that is assigned in the code,when the function ends?
#8
if you want to do it even if it is killed by another process or of it's own, you can use "atend".
An old blog on QM coding and automation.

The Macro Hook
#9
i tried using atend didn't work kept getting error
#10
when i used atend i got this error
Error in Function1: unexpected character.
#11
what's the code in that function?
An old blog on QM coding and automation.

The Macro Hook
#12
Code:
Copy      Help
int i n=EnumQmThreads(0 0 0 0)
QMTHREAD* a._new(n)
for i 0 EnumQmThreads(a n 0 0)
,if _s.getmacro(a[i].qmitemid 1)="Function1"
,,int x
,,x+1
if x=1
,str+ gb
,gb=w1
if x=2
,str+ gb2
,gb2=w1
if x=3
,str+ gb3
,gb3=w1
if x=4
,str+ gb4
,gb4=w1
#13
i tried using this
atend gb=0
#14
atend is supposed to reference a macro or function name not code.
An old blog on QM coding and automation.

The Macro Hook
#15
ok i new that but what i'm asking is how 2 reset it fomr the function and not another function


Forum Jump:


Users browsing this thread: 1 Guest(s)