Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Input Box Location


  • Please log in to reply
4 replies to this topic
awenos
  • Members
  • 29 posts
  • Last active: Jan 04 2014 07:41 PM
  • Joined: 17 Aug 2007
Is there any way to force an Input Box to be "always on top"?

I need the two button style of an input box and so can not use
GUI to create my own.

TIA

Tony

gaston
  • Guests
  • Last active:
  • Joined: --

Is there any way to force an Input Box to be "always on top"?

Yes.
#SingleInstance, force
SetTimer, onTop, 50
InputBox, OutputVar, This Input Box, enter something
; more code
return

onTop:
  if !WinExist("This Input Box")  ; <-- title of the input or msgbox
    return
  WinSet, AlwaysOnTop
  SetTimer, onTop, off
In case you really meant a MsgBox, the same technique works. Just make sure you have the correct window title (of either the inputbox or msgbox) in the onTop timer subroutine.

I need the two button style of an input box and so can not use
GUI to create my own.

Sure you can, and it is not much more difficult (and you can have as many buttons as you like). Search the Scripts and Functions forum for ready made replacement msgbox functions if you are interested)

stevel
  • Members
  • 133 posts
  • Last active: Nov 15 2013 12:32 AM
  • Joined: 12 Oct 2010
This has worked for me when using InputBox:
Gui +OwnDialogs +AlwaysOnTop
InputBox, OutVar , Any Title, Your Prompt ; etc.


decca
  • Members
  • 5 posts
  • Last active: Aug 08 2019 04:33 PM
  • Joined: 19 Oct 2012
Thanks stevel,
That works for me to.

rosto
  • Members
  • 130 posts
  • Last active: Jan 06 2016 01:50 PM
  • Joined: 14 Feb 2006

This has worked for me when using InputBox:

Gui +OwnDialogs +AlwaysOnTop
InputBox, OutVar , Any Title, Your Prompt ; etc.

 

But it is not what awenos asked.

This set all Gui windows on Top not only the inputbox window.