hide/destroy text in gui?

Get help with using AutoHotkey and its commands and hotkeys
wryyymuda
Posts: 32
Joined: 21 Sep 2018, 21:43

hide/destroy text in gui?

01 Nov 2018, 20:49

so i was testing some gui stuff out for something i planned on making later but i ran into a problem, i couldn't hide the text and so i tried that but it was
something like this(just the loop part)

loop {
x += 10
y += 10
guicontrol, hide , text
gui, add , text , x%x% y%y% vtext , sample text
if ( x > 200 ) {
x = 1
}
if ( y > 200 ) {
y = 1
}
}

but that didn't work cause i wasn't destroying the actual vtext gui element so i tried this(this is where i am at now and i have no idea what to do)



x = 1
y=1
var1 = 0
var2 = -1
gui, show , w1000 h1000
+,::
loop 800 {
var1 += 1
var2 += 1
x += 10
y += 10
guicontrol, hide, vmytext%var2%
sleep, 1
gui, add, text, x%x% y%y% vmytext%var1% , sample text
if ( x > 200 ) {
x = 1
}
if ( y > 200 ) {
y = 1
}
}



so i removed var2 completely and just made it var1 but the text elements just seem to overlap one another. what do i do? i have seen people say use gui destroy but that destroys the whole gui window.
MannyKSoSo
Posts: 440
Joined: 28 Apr 2018, 21:59

Re: hide/destroy text in gui?

02 Nov 2018, 13:53

So the x and y positions of text will be automatically set when you add a new control so you don't need those options for the control.

Return to “Ask For Help”

Who is online

Users browsing this forum: anhnha, Bing [Bot], boybenqn, Rohwedder, Sabestian Caine and 40 guests