Sign in to follow this  
Followers 0
layer

$i= GUICtrlCreateInput

9 posts in this topic

Im making this program...And I want it to have a twist to it by adding GUI instead of InputBox...I need it to type the text that the user typed in into another window, I have this down except it types the number 3... If I use inputbox, it works fine, but I want to add different styles with the GUI, any suggestions? :)


FootbaG

Share this post


Link to post
Share on other sites



You need to do a Guiread($i) it seems. However, the explanation is no more than to make a person wonder what in the world you mean.


Who else would I be?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I think I know what you mean

Are you trying to do something like this

$password = InputBox("Password prompt", "Please enter your password.", "", "*", 300, 100)

if $password = ("correct") then 
            MsgBox(4096,"", "Bingo.")
else 
           MsgBox(4096,"", "Er wrong.")
endif

Adcept you want to use GUICtrlCreateInput instead of InputBox ?

I actually need help on the same topic,but im not going to start a new thread !

Can anyone give an example like the 1 I have above adcept using GUICtrlCreateInput ?

Edited by nova

Share this post


Link to post
Share on other sites

Like this?

#include "GUIConstants.au3"

GUICreate(" My GUI input acceptfile", 320,120, @DesktopWidth/2-160, @DesktopHeight/2-45, -1, 0x00000018); WS_EX_ACCEPTFILES
$password = GUICtrlCreateInput ( "", 10,  5, 300, 20)
$btn = GUICtrlCreateButton ("Ok", 40,  75, 60, 20)

GuiSetState () 

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
       $msg = GUIGetMsg()
       Select
           Case $msg = $btn
               exitloop
       EndSelect
Wend
$password=GUIRead($password)
if $password = ("correct") then
           MsgBox(4096,"", "Bingo.")
else
          MsgBox(4096,"", "Er wrong.")
endif

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Bingo !

Cheers SK

Share this post


Link to post
Share on other sites

Nope, I tried GUIRead ("$file") but it didn't work, I used to know how to do this, any more suggestions? In case your wondering, heres the code =D

#include "GUIConstants.au3"

GUICreate("AuHomework",300, 200, -1, -1, 0x00080000, 0x00020000)
GUICtrlCreateLabel ("Please enter some keywords on your work:", -1, -1)
$file = GUICtrlCreateInput ( "", 10,  25, 250, 20)
GUICtrlSetState(-1,$GUI_ACCEPTFILES) 
$hey = GUICtrlCreateButton ("Go!", 40,  75, 60, 20)
GuiSetState ()
Func godo ()
   GUIRead ("$file")
   Send("#r")
Send("http://www.google.com")
Send ("{enter}")
sleep ("2000")
send ($file)
Send ("{enter}")
endfunc
While 1
       $get = GUIGetMsg()
       Select
       case $get= $GUI_EVENT_CLOSE
          exitloop
           Case $get = $hey
godo ()
       EndSelect
    Wend

I don't think that this is all I will be adding...I may be adding some more but this is just to make it work, so any reasons why I can't make the file type the string $file into google?


FootbaG

Share this post


Link to post
Share on other sites

w00t, i got it! here it is, just a little change...

#include "GUIConstants.au3"

GUICreate("AuHomework",300, 200, -1, -1, 0x00080000, 0x00020000)
GUICtrlCreateLabel ("Please enter some keywords on your work:", -1, -1)
$file = GUICtrlCreateInput ( "", 10,  25, 250, 20)
GUICtrlSetState(-1,$GUI_ACCEPTFILES) 
$hey = GUICtrlCreateButton ("Go!", 40,  75, 60, 20)
GuiSetState ()
Func godo ()
   Send("#r")
Send("http://www.google.com")
Send ("{enter}")
sleep ("2000")
send (GUIRead ($file))
Send ("{enter}")
endfunc
While 1
       $get = GUIGetMsg()
       Select
       case $get= $GUI_EVENT_CLOSE
          exitloop
           Case $get = $hey
godo ()
       EndSelect
    Wend

thanks all!!


FootbaG

Share this post


Link to post
Share on other sites

Thanks Larry, but I fixed it already =P But we all start out as n00bs no? And sooner or later, all n00bs learn, no?


FootbaG

Share this post


Link to post
Share on other sites

Not all, no, but most.

Share this post


Link to post
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
Sign in to follow this  
Followers 0