Code: Select all
Inputbox test1, test
Run %test1% ,,hide
return
Esc::ExitApp
Code: Select all
Run %test1% ,,hide
Code: Select all
Inputbox test1, test
Run %test1% ,,hide
return
Esc::ExitApp
Code: Select all
Run %test1% ,,hide
Code: Select all
var := sendInputBox()
MsgBox, %var%
sendInputBox()
{
global editfield
Gui, 99:Add, Edit, x2 y9 w270 h20 veditfield,
Gui, 99:Show, w278 h36, InputBox
while(!GetKeyState("Enter", "p"))
continue
Gui, 99:Submit, nohide
Gui, 99:Destroy
return editfield
}
Code: Select all
while(!GetKeyState("Enter", "p"))
sleep 1
True. i didnt thought about thattmplinshi wrote:Nice idea to use while(!GetKeyState("Enter", "p")). But at least add 1 milliseconds to it, otherwise the script will take up a lot of CPU, 8% for me.
Code: Select all
while(!GetKeyState("Enter", "p")) sleep 1
Code: Select all
var := sendInputBox()
MsgBox, %var%
return
sendInputBox()
{
global editfield
Gui, 99:Add, Edit, x2 y9 w270 h20 veditfield,
Gui, 99:Show, w278 h36, InputBox
while(!GetKeyState("Enter", "p"))
Sleep, 100
Gui, 99:Submit, nohide
Gui, 99:Destroy
return editfield
}
Code: Select all
MsgBox, % sendInputBox()
MsgBox, % sendInputBox2()
return
sendInputBox()
{
static
Gui, 99:+HWNDhGUI
Gui, 99:Add, Edit, x2 y9 w270 h20 veditfield +HWNDhEdit,
Gui, 99:Show, w278 h36, InputBox
while !( GetKeyState("Enter", "p") && WinActive("ahk_id " hGUI) )
Sleep, 100
Gui, 99:Submit
Gui, 99:Destroy
return editfield
}
sendInputBox2()
{
static
Gui, 99:+HwndHGUI
Gui, 99:Add, Edit, x2 y9 w270 h20 veditfield,
Gui, 99:Add, Button, Default Hidden, OK
Gui, 99:Show, w278 h36, InputBox
WinWaitClose, ahk_id %HGUI%
return editfield
99ButtonOK:
Gui, 99:Submit
Gui, 99:Destroy
return
}
Code: Select all
q::
SendMessage, 0x50,, 0x4090409,, A ; English
Gui, +AlwaysOnTop +Caption +LastFound +ToolWindow +Owner
Gui, Add, Edit, x2 y9 w270 h20 vtest1
gui, add, button, Default,GO
Gui, Show, w278 h36, InputBox
WinSet, TransColor, %CustomColor% 50
return
ButtonGO:
gui, submit, nohide
Run %test1% ,,hide
Gui, Destroy
return
Esc::ExitApp
Users browsing this forum: Araphen, Google [Bot], Peiya, ShatterCoder, uchihito, zvit and 319 guests