Jump to content

An existing inputbox?


Recommended Posts

$variable1 = InputBox("Example", "Your text:")

I want like this, but even he clicks OK nothing happens. It just changes the $variable1. I mean it must exist all the time so if he wants to change he can change. And Im going to make when he presses F1, he will print the text to the page. Is that possible?

Link to comment
Share on other sites

look at GUI commands in the help file and start learning :mellow:

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

$variable1 = InputBox("Example", "Your text:")

I want like this, but even he clicks OK nothing happens. It just changes the $variable1. I mean it must exist all the time so if he wants to change he can change. And Im going to make when he presses F1, he will print the text to the page. Is that possible?

Look at GUICtrlCreateInput in the helpfile.

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

$variable1 = InputBox("Example", "Your text:")

I want like this, but even he clicks OK nothing happens. It just changes the $variable1. I mean it must exist all the time so if he wants to change he can change. And Im going to make when he presses F1, he will print the text to the page. Is that possible?

What you want cannot be done with the built-in inputbox. You have to create your own. Here's an example:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 270, 118, -1, -1)
$Input1 = GUICtrlCreateInput("Input1", 16, 32, 225, 21)
$Label1 = GUICtrlCreateLabel("Your Text:", 16, 8, 53, 17)
$Button1 = GUICtrlCreateButton("OK", 96, 72, 75, 25)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            $userInput = GUICtrlRead($Input1)
            MsgBox(0, "", "You entered: " & $userInput)
    EndSwitch
WEnd

#include <ByteMe.au3>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...