GUI within a loop, controlled by a SetTimer. Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
wetware05
Posts: 750
Joined: 04 Dec 2020, 16:09

GUI within a loop, controlled by a SetTimer.

Post by wetware05 » 14 Aug 2022, 09:54

In Spain we say "I go where they don't call me" (me meto donde no me llaman). Since I gave a partial solution to aliztori, I've been working on how my script or solution could be integrated into a blucle (it may not be what aliztori wants), but I'm intrigued on how to fix it. I have not found a solution. In the script below, how to make the data entry appear ten times GUI, Show?, for example. I mean, how to integrate a loop into this script?

(The SetTimer was added because I didn't want an OK button, but instead wanted a value to be saved just by entering it into the dialog.)

Code: Select all

Settimer, CtrlGet, 250

gui, add, edit, w100 vValue
gui, show,, Edit Text
return

CtrlGet:
  guiControlGet, txtVar,, Value
  If (txtVar !="")
  {
  Msgbox, Your variable is saved with the name of txtVar: %txtVar%
  Settimer, CtrlGet, off
  gui, destroy
  }
return
And now I'm going to dedicate my own things, I've already used too much of my time on this topic... :crazy:


BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: GUI within a loop, controlled by a SetTimer.  Topic is solved

Post by BoBo » 14 Aug 2022, 10:20

I didn't want an OK button, but instead wanted a value to be saved just by entering it into the dialog.

Code: Select all

gui, add, edit, w100 vValue gCtrlGet
gui, show,, Edit Text
return

CtrlGet:
  guiControlGet, txtVar,, Value
  If (txtVar !="") {
     ToolTip % "Your variable is saved with the name of txtVar:" txtVar
     }
  return
  
F1::
  Gui, Destroy
  MsgBox % "You've entered:" txtVar
  return

User avatar
boiler
Posts: 16926
Joined: 21 Dec 2014, 02:44

Re: GUI within a loop, controlled by a SetTimer.

Post by boiler » 14 Aug 2022, 11:24

Thread is locked because it is a duplicate of another thread.

Locked

Return to “Ask for Help (v1)”