AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with using multiple InputBoxes

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Gakusei



Joined: 09 Jan 2008
Posts: 15

PostPosted: Wed Jan 09, 2008 8:23 pm    Post subject: Problem with using multiple InputBoxes Reply with quote

I seem to be having trouble with using multiple input boxes. Don't know how to best explain this, so I'll just type out a scenario.

Say I'm using a text editor and I use a hotkey to have a series of InputBoxes ask me different questions that will in turn take what I've inputted and type out a note for me. The first InpuxBox usually pops up fine and all, but sometimes, after I answer the question on the first inputbox (or second or third sometimes, etc.), the next inputbox appears as the "active" window on the taskbar, but it appears underneath the text editor, so I have to alt+tab to bring it back up.

Is there a way to make sure that the InputBoxes always come up as the top window?

Here is a sort of example of the code I'm working with. I know it doesn't actually do anything, but you should get the idea, I think. I've even tried to use WinActivate after each InputBox line and it still doesn't work correctly at times:

Code:
MENU_ONE=
(
Select:

1. Do stuff
2. Other stuff
3. Different stuff
)

MENU_TWO=
(
Select:

1. Do stuff
2. Other stuff
3. Different stuff
)

MENU_THREE=
(
Select:

1. Do stuff
2. Other stuff
3. Different stuff
)

WINDOW_ID=- Test Popup

InputBox, varOne, varOne %WINDOW_ID%, %MENU_ONE%,, 200, 280,,,,,1
InputBox, varTwo, varTwo %WINDOW_ID%, %MENU_TWO%,, 200, 280,,,,,1
InputBox, varThree, varThree %WINDOW_ID%, %MENU_THREE%,, 200, 280,,,,,1
Back to top
View user's profile Send private message
Guest






PostPosted: Wed Jan 09, 2008 8:56 pm    Post subject: Reply with quote

You may try to use a GUI instead of all these inputboxes.
To fix your script I guess a simple "sleep, some value" between the inputboxes will be ok.Btw,usually it is better to put some errorlevel checking after each inputbox.
Back to top
Gakusei



Joined: 09 Jan 2008
Posts: 15

PostPosted: Thu Jan 10, 2008 12:54 pm    Post subject: Reply with quote

Ah, the sleep method seems to work. Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group