Flax Posted April 5, 2017 Share Posted April 5, 2017 Hey, is there a way to get info where file was dropped in your GUI ? For example I have two info boxes and need to know if it was dropped in first or second box Thx Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 5, 2017 Moderators Share Posted April 5, 2017 Moved to the appropriate forum, as the Dev forum states at the top Quote Do not create AutoIt-related topics here "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
TheSaint Posted April 5, 2017 Share Posted April 5, 2017 Here is a simple solution for you. Note the - @GUI_DropId = $Input_0 ; Script generated by GUIBuilder Prototype 0.9 #include <Constants.au3> #include <GUIConstantsEx.au3> #include <Misc.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> Const $style = BitOR($WS_OVERLAPPED, $WS_CAPTION, $WS_SYSMENU, $WS_VISIBLE, $WS_CLIPSIBLINGS, $WS_MINIMIZEBOX) Global $h_main = GuiCreate("MyGUI", 400, 44, -1, -1, $style, $WS_EX_ACCEPTFILES) Global $Input_0 = GuiCtrlCreateInput("", 10, 10, 380, 20) GUICtrlSetState($Input_0, $GUI_DROPACCEPTED) GuiSetState(@SW_SHOWNORMAL) Do Switch GuiGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $GUI_EVENT_DROPPED If @GUI_DropId = $Input_0 Then GUICtrlSetData($Input_0, @GUI_DragFile) Case Else ; EndSwitch Until False GUIDelete($h_main) Exit Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
Flax Posted April 6, 2017 Author Share Posted April 6, 2017 Thanks, @GUI_DropId thats the one Link to comment Share on other sites More sharing options...
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