Jump to content

GUICtrlCreateInput and GUICtrlRead what am i doing wrong?

Recommended Posts

here is my script(copied part of a script in the help file and making it work for my main script)

#include <GUIConstants.au3>

GUICreate(" My GUI input acceptfile", 320,120, @DesktopWidth/2-160, @DesktopHeight/2-45, -1, 0x00000018); WS_EX_ACCEPTFILES
$file = GUICtrlCreateInput ( "", 10,  5, 300, 20)
GUICtrlCreateInput ("", 10,  35, 300, 20)   ; will not accept drag&drop files
$btn = GUICtrlCreateButton ("Ok", 40,  75, 60, 20)

GUISetState () 

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
       $msg = GUIGetMsg()
           Case $msg = $btn
MouseClick ("left", 35, 260, 2)
WinActivate ("http://www.yahoo.com/ - Microsoft Internet Explorer")
WinWaitActive ("http://www.yahoo.com/ - Microsoft Internet Explorer")
MouseClick ("left", 150, 68, 1)
MouseClick ("left", 160, 105, 1)
Send ("(GUICtrlRead($Sentence)")

can anybody help me?i dont know anything about GUI's

Link to comment
Share on other sites

You have to do this on each input you want to accept drops, not just the first one:

GUICtrlSetState(-1, $GUI_DROPACCEPTED)oÝ÷ Ø  l£*.­×¦¡Ú²}ý¶Æ¯zØ^
í®HíërÝznµº1jëh×6$file = GUICtrlCreateInput("", 10, 5, 300, 20)
$sentence = GUICtrlCreateInput("", 10, 35, 300, 20)   ; will now accept drag&drop files


Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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

  • Recently Browsing   0 members

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