Search the Community
Showing results for tags '_filedragdrop'.
-
I have a simple code that takes file "C:\Temp\File1.txt" and pastes it in drop area of specific firefox location ( Note : The drag drop works manually meaning firefox window supports drag and drop) . The return value is true with no error indicating that operation successful. The results are not getting updated in firefox window even after exe execution completion and sleep time 20secs. Attached my code snippet and _FileDragDrop.au3 + text file it works #include "_FileDragDrop.au3" Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client $File1 = "E:\AutoIt\DragDropFile\File1.txt" $File2 = "E:\AutoIt\DragDropFile\File2.txt" If ProcessExists("Firefox.exe") Then $hWnd = WinGetHandle("Mozilla Firefox") ; My FF tab title substring WinActivate($hWnd) Else MsgBox(64,"Error","No Firefox window found",10) EndIf $hNPPlus=WinGetHandle("[CLASS:Notepad++]") WinActivate($hNPPlus) $iRet = _FileDragDrop($hNPPlus, $File1, 75, 274) ConsoleWrite("Return: "&$iRet&" @error="&@error&", @extended="&@extended&@CRLF) Sleep(20000) ;~ Above code to add in Notepad++ works fine ;~ Cordinate from drop file 1 - 75, 274 $iRet = _FileDragDrop($hWnd, $File1, 75, 274,'|',False) ConsoleWrite("Return: "&$iRet&" @error="&@error&", @extended="&@extended&@CRLF) Sleep(20000) ;~ Above code to add file in firefox with title Mozilla firefox DOES NOT work Exit Repose from code --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop Return: True @error=0, @extended=0 Return: True @error=0, @extended=0 _FileDragDrop.au3 File1.txt