AutoHotkey Community

It is currently May 26th, 2012, 5:33 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Modal InputBox?
PostPosted: April 19th, 2009, 8:07 pm 
Offline

Joined: December 30th, 2006, 4:13 pm
Posts: 132
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Was doing a wife-beta and she accidentally clicked the GUI behind the InputBox. This caused the GUI to come to the top and the InputBox to disappear, which confused her greatly. Worse, this is a Windows Mobile script using AHKCE, so switching to the InputBox via the task bar button isn't an option.

In the docs, there's nothing about making an InputBox modal.
Any suggestions on how to accomplish this?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2009, 9:42 pm 
Create your own InputBox using ...
Code:
Gui, +AlwaysOnTop
Gui, Add, Edit, ...
Gui, Add, Button, ...
Gui, Show,, Test
Return


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2009, 10:20 pm 
Offline
User avatar

Joined: October 7th, 2006, 8:45 am
Posts: 3329
Location: Simi Valley, CA
It may help to disable the gui while a dialogue is open.

If you want to get into some advanced stuff, you can use SetParent() via dllcall. Making the inputbox window a child of the main gui window should keep it on top.

_________________
Ternary (a ? b : c) guide     TSV Table Manipulation Library
Post code inside [code][/code] tags!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 20th, 2009, 2:24 am 
Offline

Joined: April 17th, 2009, 9:02 am
Posts: 20
easy, just add "Gui, +OwnDialogs" before input box

Code:
Gui, Add, Button, , TryMe
Gui, Show, w800 h600
Return

ButtonTryMe:
{
   Gui, +OwnDialogs ;Add This line just before input box
   InputBox, var, , This Input Box is in modal mode
   MsgBox, U'd Enter `"%var%`"
}
Return


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: batto, BrandonHotkey, dmg, mrhobbeys, MSN [Bot], Mtes, notsoobvious, rbrtryn, stanman and 64 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group