Jump to content

Dont know what i do wrong


Wollf
 Share

Recommended Posts

i made a gui but i dont know how exactly to make drag and drop work, i want to make it accept files also i have another question i want to make the image dragable so so when i put files at rar then drag an image there and that image will saw where the files will go at the computer. here it should be a pretty stupid mistake but i dont know it very well

#include <GUIConstants.au3>
#include <WindowsConstants.au3>


#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 685, 629, 193, 125)
$Label1 = GUICtrlCreateLabel("Directories", 80, 24, 91, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Pic1 = GUICtrlCreatePic("images/1.jpg", 16, 68, 100, 100)
$Pic2 = GUICtrlCreatePic("images/1.jpg", 124, 68, 100, 100)
$Pic3 = GUICtrlCreatePic("images/1.jpg", 16, 176, 100, 100)
$Pic4 = GUICtrlCreatePic("images/1.jpg", 124, 176, 100, 100)
$Pic5 = GUICtrlCreatePic("images/1.jpg", 16, 284, 100, 100)
$Pic6 = GUICtrlCreatePic("images/1.jpg", 124, 284, 100, 100)
$Pic7 = GUICtrlCreatePic("images/1.jpg", 16, 392, 100, 100)
$Pic8 = GUICtrlCreatePic("images/1.jpg", 124, 392, 100, 100)
$Pic9 = GUICtrlCreatePic("images/1.jpg", 16, 500, 100, 100)
$Pic10 = GUICtrlCreatePic("images/1.jpg", 124, 500, 100, 100)
$Button1 = GUICtrlCreateButton("Send files to server", 388, 452, 125, 45, 0)
$Label2 = GUICtrlCreateLabel("", 260, 32, 417, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

$cListBox = GUICtrlCreateList("", 350, 100, 200, 200)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)



While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
Edited by Wollf
Link to comment
Share on other sites

do u know where i am wrong or is there any other way a can make a drag and drop box?

#include <GuiConstantsEx.au3>
#include <EditConstants.au3> ; $WS_EX_ACCEPTFILES should be in here according to the help file

Global Const $WS_EX_ACCEPTFILES = 0x00000010
Global $sEditText = ""

GUICreate("Drag And Drop Example", 200, 200, -1, -1, -1, $WS_EX_ACCEPTFILES)
$hEdit = GUICtrlCreateEdit($sEditText, 8, 8, 184, 184)
GUICtrlSetState(-1, $GUI_DROPACCEPTED) ; $GUI_ACCEPTFILES / $GUI_DROPACCEPTED
GUISetState()

While GUIGetMsg() <> -3 
    If GUICtrlRead($hEdit) <> $sEditText Then ; content changed so file has been dropped
        ConsoleWrite("FILE(S) DROPPED: " & GUICtrlRead($hEdit))
        GUICtrlSetData($hEdit, "")
    EndIf
    Sleep(25)
WEnd

Search Forums Next Time.

Link to comment
Share on other sites

i tried use it inside my old script and i dont know how to make it work with some it doesnt do anything with another try it seemed like it never stopped warking and i needed to restart. How exactly i can make it function correct in here

#include <GUIConstants.au3>
#include <WindowsConstants.au3>


#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 685, 629, 193, 125)
$Label1 = GUICtrlCreateLabel("Directories", 80, 24, 91, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Pic1 = GUICtrlCreatePic("images/1.jpg", 16, 68, 100, 100)
$Pic2 = GUICtrlCreatePic("images/1.jpg", 124, 68, 100, 100)
$Pic3 = GUICtrlCreatePic("images/1.jpg", 16, 176, 100, 100)
$Pic4 = GUICtrlCreatePic("images/1.jpg", 124, 176, 100, 100)
$Pic5 = GUICtrlCreatePic("images/1.jpg", 16, 284, 100, 100)
$Pic6 = GUICtrlCreatePic("images/1.jpg", 124, 284, 100, 100)
$Pic7 = GUICtrlCreatePic("images/1.jpg", 16, 392, 100, 100)
$Pic8 = GUICtrlCreatePic("images/1.jpg", 124, 392, 100, 100)
$Pic9 = GUICtrlCreatePic("images/1.jpg", 16, 500, 100, 100)
$Pic10 = GUICtrlCreatePic("images/1.jpg", 124, 500, 100, 100)
$Button1 = GUICtrlCreateButton("Send files to server", 388, 452, 125, 45, 0)
$Label2 = GUICtrlCreateLabel("", 260, 32, 417, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###



While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
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...