Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
global IStringMap
#1
is there a way to make the IStringMap a global variable?
An old blog on QM coding and automation.

The Macro Hook
#2
Why not?
#3
im trying to do this with an istringmap cuz i dont like arrays. but, ithe map is empty each time i run it.


Code:
Copy      Help
ClearOutput
int h=child(mouse)
if(!h) h=win(mouse); int toplevel=1
int w x y cx cy
str a b
GetWinXY(h x y cx cy)
IStringMap+ M=CreateStringMap(4)
out "existing entries %i" M.Count
_s.from(cx " " cy)
a=h
M.Add(a _s)
out "h=%i []s=%s" h _s
out M.Get(a)
out M.Count
out "existing entries %i" M.Count
end
An old blog on QM coding and automation.

The Macro Hook
#4
IStringMap+ M=CreateStringMap(4)

deletes old object and creates new object each time.

IStringMap+ M
if(!M) M=CreateStringMap(4)
#5
DOH!!!!!!

thanks.
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)