hide/destroy text in gui?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
wryyymuda
Posts: 32
Joined: 21 Sep 2018, 21:43

hide/destroy text in gui?

01 Nov 2018, 21:12

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.
Rindis
Posts: 213
Joined: 23 Dec 2013, 13:58
Location: Norway
Contact:

Re: hide/destroy text in gui?

02 Nov 2018, 02:20

x = 1
y = 1
var1 = 0
var2 = -1

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

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Exies, Joey5 and 82 guests