NBJ Posted March 2, 2009 Share Posted March 2, 2009 (edited) Hi All, I know this thread has gone on for a while and you are doing something quite interesting. You thought about embedding an Explorer window into the GUI earlier. Something like: expandcollapse popup#include <GUIConstantsEX.au3> #include <Misc.au3> _Singleton("RBC") $WS_EX_ACCEPTFILES = 16 $TempDir = CreateRandomTempDir() $oIE = ObjCreate("Shell.Explorer.1") #Region ### START Koda GUI section ### Form=C:\Program Files\Koda 1.7.01\Forms\QuickFTP\FNTConvert.kxf $Form1 = GUICreate("Rockbox FNT Converter", 441, 323, 293, 202, -1, $WS_EX_ACCEPTFILES) $Tab1 = GUICtrlCreateTab(6, 7, 428, 308) GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) $TabSheet1 = GUICtrlCreateTabItem("Convert") $Label1 = GUICtrlCreateLabel("Drop the font(s) onto the left (1st) pane,", 71, 50, 189, 17) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $Label2 = GUICtrlCreateLabel("then drag the converted font(s) from the right (2nd) pane.", 71, 70, 271, 17) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Owner\My Documents\Autoit Applications\DropBox.jpg", 71, 101, 130, 130) GUICtrlSetState(-1, $GUI_DROPACCEPTED) $Label3 = GUICtrlCreateLabel("Status: Waiting...", 71, 248, 85, 17) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $Progress1 = GUICtrlCreateProgress(71, 271, 297, 17) ;$Pic2 = GUICtrlCreatePic("C:\Documents and Settings\Owner\My Documents\Autoit Applications\DropBox.jpg", 234, 101, 130, 130) ;GUICtrlSetState(-1, $GUI_DROPACCEPTED) $Label5 = GUICtrlCreateLabel("1.)", 127, 160, 19, 17) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x808080) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $Label6 = GUICtrlCreateLabel("2.)", 291, 160, 19, 17) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x808080) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $TabSheet2 = GUICtrlCreateTabItem("About") $Label4 = GUICtrlCreateLabel("Developed by motionman95, 2009, All Rights Reserved.", 15, 286, 274, 17) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $GUIActiveX = GUICtrlCreateObj( $oIE, 180, 101, 230, 80) GUISetState () While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_DROPPED $File = @GUI_DragFile If StringRegExp($file, "^.+\.(?i)((TTF)|(OTF))$") Then MsgBox(0, "", $file & @CRLF & "Is a font file.") $TempDir = CreateRandomTempDir() ConvertFile($file) $oIE.navigate($TempDir) $oIE.navigate($TempDir) ;$oIE.style('1') Else MsgBox(0, "", $file & @CRLF & "Is an invalid file type.") EndIf EndSwitch WEnd Func ConvertFile($file) $FileSplit = StringSplit($File,'\') $dest = $TempDir & $FileSplit[$FileSplit[0]] ConsoleWrite(@cr&$dest) FileCopy($file,$dest,8) EndFunc Func CreateRandomTempDir() While 1 Local $RAND = Random(100000,999999,1) Local $ctrTempDir = @TempDir&'\'&$RAND&'\' if not FileExists($ctrTempDir) then ExitLoop WEnd ConsoleWrite($ctrTempDir) DirCreate($ctrTempDir) Return $ctrTempDir EndFunc The code is very dirty, and generates a random folder in %temp% each time you 'process' a file it so shows only 1 icon in the panel 2. Cheers Neil edit:spelling and paragraph1 Edited March 3, 2009 by NBJ Link to comment Share on other sites More sharing options...
martin Posted March 3, 2009 Share Posted March 3, 2009 @NBJ How do you suggest using that to drag files from the application which is the problem we have been struggling with? Dropping files onto the gui isn't a problem. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
NBJ Posted March 3, 2009 Share Posted March 3, 2009 @Martin,Hi, Sorry to intrude into the conversation.I was looking through the thread and it is my understanding that motionman95 was looking to do the following;- Have the user drop a font file onto the gui- Have the Gui recognize this and perform his conversion (yet to be programmed)- Once the Conversion is complete an Icon of the converted file show in the GUI so the user can then drag the converted file to their preferred destination.motionman95 figured out the drop onto gui, no problems. What I was proposing that was by using an embedded explorer window showing the actual converted file, the end user would then be ale to drag that out on to their desktop.At least that is whats happening on my machine (XP) when I run the script I uploaded and dragged a ttf onto area 1.In my scrappy version of the script, in stead of converting the file, I just copies the original to a unique temp folder, in order to have the Gui display 1 icon in Area 2. This icon is then available to drag to another folder.- I have to agree that the work you guys are doing is far more advanced and ultimately will be more useful to the community it will enable a far greater number of possibilities in future.Thanks for all the input I learn a great deal from these forums.NBJ Link to comment Share on other sites More sharing options...
ProgAndy Posted March 4, 2009 Share Posted March 4, 2009 (edited) I'm trying to implement the DoDragDrop and the needed COM-Interfaces in AutoIt. When i have a working example, i will post it Edited March 4, 2009 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
martin Posted March 4, 2009 Share Posted March 4, 2009 I'm trying to implement the DoDragDrop and the needed COM-Interfaces in AutoIt. When i have a working example, i will post it Great! I'll be very interested to see how you do it because I've already studied the msdn information your link leads to but I was soon confused, mainly because I don't know anything about OLE and COM interfacing. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
ProgAndy Posted March 4, 2009 Share Posted March 4, 2009 (edited) I think, i have the interfaces, but it just doesn't want to drop the data And COM/OLE-interfaces in AutoIt... That is a pain. You have to use DLLCallbackRegister for each funtion in the object, use a modified memorydllcall, since DLLCall doesn't support pointers ... //Edit:It works Now i have to clean up the code. I think i will post it the in the next days. Edited March 4, 2009 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
motionman95 Posted March 9, 2009 Author Share Posted March 9, 2009 Any progress? I'd love to see what you have so far. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted March 9, 2009 Share Posted March 9, 2009 Any progress? I'd love to see what you have so far. He already posted it in example scripts forum Drag and Drop with Explorer, a COM example .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
amin84 Posted December 4, 2010 Share Posted December 4, 2010 Hello motionman95, Tnx for the drag n drop into the GUI example. That's what I was looking for. Link to comment Share on other sites More sharing options...
VikramGanapathi Posted November 27, 2017 Share Posted November 27, 2017 Did any one Implement the same in Java. Another change in requirement that I have is that I would like to drag from windows explorer to the AUT(Web) - Selenium Java Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 27, 2017 Moderators Share Posted November 27, 2017 VikramGanapathi, As this is a forum for AutoIt, why would you expect anyone to have converted the code to Java? Perhaps asking the original question on a Java forum would be more appropriate. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
VikramGanapathi Posted November 27, 2017 Share Posted November 27, 2017 @M23, Thank you for the inputs, but I am implementing AutoIT in Selenium java, so thought there would be any sample code that would work for Java. But I realize that its an exe that I have to execute as part of Selenium that is not language dependent. Lemme try to implement the same in my and will keep you posted. Vikram Link to comment Share on other sites More sharing options...
VikramGanapathi Posted November 27, 2017 Share Posted November 27, 2017 Did any one implement Dragging and Dropping from Windows Explorer to Web Application using AutoIT Selenium Java and sample code. Link to comment Share on other sites More sharing options...
junkew Posted November 27, 2017 Share Posted November 27, 2017 (edited) You should search for sendinput dealing with the mousedown and mouseup events https://www.google.nl/search?q=sendinput+drag+drop&oq=sendinput+drag+drop&aqs=chrome..69i57j33.7451j0j4&client=tablet-android-samsung&sourceid=chrome-mobile&ie=UTF-8 https://www.autoitscript.com/autoit3/docs/functions/MouseClickDrag.htm Edited November 27, 2017 by junkew FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
iamtheky Posted November 27, 2017 Share Posted November 27, 2017 (edited) you are attempting to automate your automation with some automation....something something Java? is that about right? Edited November 27, 2017 by iamtheky ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) 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