Thanks for reading.
I have a loop code that produces indexed variables. How do I populate a tooltip with them?
maybe looking like this:
var1 var4
var2 var5
var3 var6
I only can do this on a Gui:
Code: Select all
Gui, New
N:= 1
H:= 1
W:= 1
i := 0
HMax:= 1
SysGet, SGW, 71
MouseGetPos, Xpos, Ypos
Gui, Add, Text, X10 Y10, %initialscore%, %score%
Loop, %runloopindex% {
GuiY:= 280 + 30 * H
ScreenHeight:= A_ScreenHeight - 45
If (GuiY > ScreenHeight) {
W+= 1
HMax:= H
H= 1
}
Y1:= 18 + 30 * H
Y2:= 15 + 30 * H
GuiWidth:= 140 * W
If (W = 1) {
GuiHeight:= 50 + 30 * H
ButtonHeight:= 30 + 30 * H
}
If (W > 1) {
GuiHeight:= 50 + 30 * HMax
ButtonHeight:= 30 + 30 * HMax
}
Button1Width:= GuiWidth - 100
Button2Width:= GuiWidth - 60
TextWidth:= GuiWidth - 135
Gui, Add, Text, x%TextWidth% Y%Y1%,% i ": " sessionscore%I% ", " sessiontotal%i%
If (A_Index = runloopindex) {
X_Offset:= GuiWidth/2
Y_Offset:= GuiHeight/2
X_Limit:= A_ScreenWidth - X_Offset
Y_Limit:= A_ScreenHeight - Y_Offset
Mouse_X:= Xpos - X_Offset
Mouse_Y:= Ypos - Y_Offset
If Xpos between 0 and %X_Offset%
Move_X:= 0
If Xpos between %X_Offset% and %X_Limit%
Move_X:= Mouse_X
If Xpos between %X_Limit% and %A_ScreenWidth%
Move_X:= A_ScreenWidth - GuiWidth
If Ypos between 0 and %Y_Offset%
Move_Y:= 0
If Ypos between %Y_Offset% and %Y_Limit%
Move_Y:= 10
If Ypos between %Y_Limit% and %A_ScreenHeight%
Move_Y:= A_ScreenHeight - GuiHeight - 40
Gui, Add, Button, x%Button1Width% y%ButtonHeight% w50 h20 gcancel default, Return
Gui, Add, Button, x%Button2Width% y%ButtonHeight% w50 h20 gunpaue, ok
Gui, Show, x%Move_X% y%Move_Y% w%GuiWidth% h%GuiHeight%, scores
pause
Break
}
N+= 1
H+= 1
i+= 1
}
Return
kind regards