obscurant1st Posted December 15, 2009 Posted December 15, 2009 (edited) In my script the drag n drop is not working? can anybody give me ahint on this please?? #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) #Region ### START Koda GUI section ### Form= Dim $Form1 Dim $Button1 Global $Input2 Global $Input1 Global $Label1 Global $Label2 Global $nMsg,$exists,$malwares,$threatFolder,$readFile,$writeFile,$temp,$dirN,$getFilename,$justFile,$filePath $Form1 = GUICreate("KAV Scan Automator", 310, 181, 192, 114) GUISetBkColor(0xA6CAF0) $Input1 = GUICtrlCreateInput("Drag n Drop the folder", 104, 40, 161, 21) GUICtrlSetState($Input1, $GUI_DROPACCEPTED) $Input2 = GUICtrlCreateInput("Drag n Drop the folder", 104, 80, 161, 21) GUICtrlSetState($Input2, $GUI_DROPACCEPTED) $Label1 = GUICtrlCreateLabel("Source", 16, 40, 50, 24) GUICtrlSetFont(-1, 12, 400, 0, "Impact") $Label2 = GUICtrlCreateLabel("Destination", 16, 80, 79, 24) GUICtrlSetFont(-1, 12, 400, 0, "Impact") $Button1 = GUICtrlCreateButton("Go!!!", 112, 136, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### --Update: I got it. I had to change the gui creation code to $Form1 = GUICreate("KAV Scan Automator", 310, 181, 192, 114 , -1 , 0x00000018 ) ; 0x00000018 for accepting folders) but i dont hv any idea why that number was added. I have done this in one of my previous script also. so can anybody please tell me why is this?? Edited December 15, 2009 by obscurant1st [u]We don't need people who can spit back facts. We've got Google."[/u] WebguruBB - Free Hosting, Domains, and SEO articles.Awesome Techs - Tips, Tricks and Some Technology NewsCool Facts - Cool Facts, Fun Facts, Weird Facts etc.
Josbe Posted December 15, 2009 Posted December 15, 2009 In my script the drag n drop is not working? can anybody give me ahint on this please?? #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) #Region ### START Koda GUI section ### Form= Dim $Form1 Dim $Button1 Global $Input2 Global $Input1 Global $Label1 Global $Label2 Global $nMsg,$exists,$malwares,$threatFolder,$readFile,$writeFile,$temp,$dirN,$getFilename,$justFile,$filePath $Form1 = GUICreate("KAV Scan Automator", 310, 181, 192, 114) GUISetBkColor(0xA6CAF0) $Input1 = GUICtrlCreateInput("Drag n Drop the folder", 104, 40, 161, 21) GUICtrlSetState($Input1, $GUI_DROPACCEPTED) $Input2 = GUICtrlCreateInput("Drag n Drop the folder", 104, 80, 161, 21) GUICtrlSetState($Input2, $GUI_DROPACCEPTED) $Label1 = GUICtrlCreateLabel("Source", 16, 40, 50, 24) GUICtrlSetFont(-1, 12, 400, 0, "Impact") $Label2 = GUICtrlCreateLabel("Destination", 16, 80, 79, 24) GUICtrlSetFont(-1, 12, 400, 0, "Impact") $Button1 = GUICtrlCreateButton("Go!!!", 112, 136, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### From Helpfile (GUICtrlCreateInput page): If you want to drag & drop a filename onto this control just add the WS_EX_ACCEPTFILES extended style on the GUICreate() and set the state to $GUI_DROPACCEPTED. So, edit: $Form1 = GUICreate("KAV Scan Automator", 310, 181, 192, 114, -1, $WS_EX_ACCEPTFILES ) AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now