Jump to content

Recommended Posts

Posted

Is it possible to make an input box that you cannot see? I just want to input a word, but dont want to have the box visible.

-Brett
Posted

i have used kixtart to do something similar, there is a way to records keystrokes untill the user hits enter and then it puts it in a varable, but i don't think you can do something like that with autoit...? :D (unless someone proves me wrong)

Posted (edited)

Place the InputBox at @Desktopheight and @Desktopwidth... :huh2:

New Command (Add it to the help :D )

Hidden InputBox sintax

InputBox ( "", "" ,"" ,"" , -1, -1 , @DesktopHeight, @DesktopWidth [, TimeOut] )

This command allow you to use a invisible InputBox.

E.G.

$Alpha = InputBox ( "", "" ,"" ,"" , -1, -1 , @DesktopHeight, @DesktopWidth)

MsgBox(0,"",$Alpha)

Edited by ezzetabi
Posted

Unluckly you can bring the hidden imput box out just right clicking on the autoit taskbar icon selecting move and pressing {up} or {left}...

Posted (edited)

a little helper autoit script would be good to go along with it.

Have the helper autoit script keep focus on the window, and keep it at the right location.

; compile and include in script
; this hides and keeps the input box in position.
WinWaitActive("AutoIt Input Box","")
tooltip("Enter Password now please"); added for convienence.
While winexists("AutoIt Input Box")
    winsetstate("AutoIt Input Box","",@SW_HIDE)
    winactivate("AutoIt Input Box","")
    WinMove("AutoIt Input Box","", -1, -1, @DesktopWidth, @DesktopHeight )
sleep(10)
Wend

$x=InputBox ( "", "" ,"" ,"" , -10, -10 , @DesktopHeight, @DesktopWidth  )
MsgBox(1,"you entered",$x)

btw, a blank input box is named "AutoIt Input Box" by AutoIt

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Posted (edited)

Good Idea!!

But

; compile and include in script
; this hides and keeps the input box in position.
WinWaitActive("AutoIt Input Box","")
tooltip("Enter Password now please"); added for convienence.
While winexists("AutoIt Input Box")
    winsetstate("AutoIt Input Box","",@SW_HIDE) #cs <--- This will not stop the Input Box
                                    from working? Can you send keys to a invisible window?
                                    It is not better just keep it out of sight? #ce

    winactivate("AutoIt Input Box","")
    WinMove("AutoIt Input Box","", -1, -1, @DesktopWidth, @DesktopHeight )
sleep(10)
Wend
Edited by ezzetabi
Posted

Actually try it out, it seems strange, but it works fine.

Matter of fact, try this with a normal imput box, it will hide it, size it, and keep it active. But it will blink.

We have a few little tricks up our sleeve that seem like they wouldn't work at first glance. :D

AutoIt3, the MACGYVER Pocket Knife for computers.

Posted (edited)

Not curently, autoit kinda stops until the display is done. The new Gui might be the actual way to go, but for now it is only in testing.

Edit...

The new Gui stops running adlib scripts as well until the Gui closes or updates as well....

AdlibEnable ("timer") 
$nX=1
;===============functions==============
Func timer()
    $nX=$nX+1
    tooltip($nX,0,0)
EndFunc
;===============End functions===========

sleep(3000)
; the original AU3 type
$input= InputBox ("My first AutoIt GUI", "Please Enter ?")
; the new GUI AU3 type
sleep(2000)
GuiCreate ("My first AutoIt GUI") ; start the definition 
    
GuiSetControl ("label", "Please Enter ?", 10,10); add prompt info 
$nInput = GuiSetControl ("input", "", 10,30) ; add the input area 
$nOk    = GUISetControl ("button", "OK", 20,70); add the button that will close the GUI 
    
GuiWaitClose (); to display the dialog box 
    
if $nOK= GuiRead () then; to verify if OK was click 
  $input = GuiRead ($nInput); get the type value 
  msgbox(0,"Result", $input); will display the typed value 
endif

watch the timer stop when a box is up.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

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
  • Recently Browsing   0 members

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