Sign in to follow this  
Followers 0
jeantje

Drag N Drop ?

6 posts in this topic

I have a question let say i open my c: drive an want to copy files to f: is it possible to encrypt them in the meanwhile so that if i am going to copy files from f: to another drive or my desktop that it wil decrypt them?


Share this post


Link to post
Share on other sites



I have a question let say i open my c: drive an want to copy files to f: is it possible to encrypt them in the meanwhile so that if i am going to copy files from f: to another drive or my desktop that it wil decrypt them?

maybe this will help..??


[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

maybe this will help..??

i already knew that but how do i do the drag and drop stuff


Share this post


Link to post
Share on other sites

i already knew that but how do i do the drag and drop stuff

Hire is a sample: Drag & drop files into the GUI & it will add [EN]_in front of the filename.

Hire is where the replacement is done.

FileMove($File,$filepath & '[EN]_' & $FileX)

Global $File, $GUI

Opt("GUIOnEventMode", 1)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

    $GUI = '_Add [EN]_'
    $Iread_X = IniRead("config.ini", $GUI, "x", "0")
    $Iread_Y = IniRead("config.ini", $GUI, "y", "0")


#Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate($GUI, 139, 97, $Iread_X, $Iread_Y,-1,$WS_EX_ACCEPTFILES)

    WinSetOnTop($GUI,'',1)

    GUISetBkColor(0xf2f2f2)
    GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

GUIRegisterMsg(0x233, "On_WM_DROPFILES")
GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")

While 1
    Sleep(100)
WEnd


;~ #cs
Func _move()
    
    $split = StringSplit($File,'\')
    
    $filepath = StringReplace($File,$split[$split[0]],'')   ; Filepath
    $Filename = $split[$split[0]]                           ; Filename
    
    ToolTip('Working...' & $Filename,0,0)
    
    $FileX = StringReplace($Filename,' (www.hentairules.net) [English]',' ')


;~  ConsoleWrite($File & @CRLF)
    FileMove($File,$filepath & '[EN]_' & $FileX)
    
    ToolTip('')
EndFunc



Func On_WM_DROPFILES($hWnd, $Msg, $wParam, $lParam)
    Local $tDrop, $aRet, $iCount
    ;string buffer for file path
    $tDrop = DllStructCreate("char[260]")
    ;get file count
    $aRet = DllCall("shell32.dll", "int", "DragQueryFile", _
                                            "hwnd", $wParam, _
                                            "uint", -1, _
                                            "ptr", DllStructGetPtr($tDrop), _
                                            "int", DllStructGetSize($tDrop) _
                                            )
    $iCount = $aRet[0]
    ;get file paths
    For $i = 0 To $iCount-1
        $aRet = DllCall("shell32.dll", "int", "DragQueryFile", _
                                                "hwnd", $wParam, _
                                                "uint", $i, _
                                                "ptr", DllStructGetPtr($tDrop), _
                                                "int", DllStructGetSize($tDrop) _
                                                )
                                                
        $File = DllStructGetData($tDrop, 1)
        _move()
    Next
    ;finalize
    DllCall("shell32.dll", "int", "DragFinish", "hwnd", $wParam)
    Return
EndFunc

Func _exit()
    $pos = WinGetPos("[active]")
    
    IniWrite("config.ini", $GUI, "x", $pos[0])
    IniWrite("config.ini", $GUI, "y", $pos[1])
        
    Exit    
EndFunc

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites

Hire is a sample: Drag & drop files into the GUI & it will add [EN]_in front of the filename.

Hire is where the replacement is done.

FileMove($File,$filepath & '[EN]_' & $FileX)

Global $File, $GUI

Opt("GUIOnEventMode", 1)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

    $GUI = '_Add [EN]_'
    $Iread_X = IniRead("config.ini", $GUI, "x", "0")
    $Iread_Y = IniRead("config.ini", $GUI, "y", "0")


#Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate($GUI, 139, 97, $Iread_X, $Iread_Y,-1,$WS_EX_ACCEPTFILES)

    WinSetOnTop($GUI,'',1)

    GUISetBkColor(0xf2f2f2)
    GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

GUIRegisterMsg(0x233, "On_WM_DROPFILES")
GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")

While 1
    Sleep(100)
WEnd


;~ #cs
Func _move()
    
    $split = StringSplit($File,'\')
    
    $filepath = StringReplace($File,$split[$split[0]],'')   ; Filepath
    $Filename = $split[$split[0]]                           ; Filename
    
    ToolTip('Working...' & $Filename,0,0)
    
    $FileX = StringReplace($Filename,' (www.hentairules.net) [English]',' ')


;~  ConsoleWrite($File & @CRLF)
    FileMove($File,$filepath & '[EN]_' & $FileX)
    
    ToolTip('')
EndFunc



Func On_WM_DROPFILES($hWnd, $Msg, $wParam, $lParam)
    Local $tDrop, $aRet, $iCount
    ;string buffer for file path
    $tDrop = DllStructCreate("char[260]")
    ;get file count
    $aRet = DllCall("shell32.dll", "int", "DragQueryFile", _
                                            "hwnd", $wParam, _
                                            "uint", -1, _
                                            "ptr", DllStructGetPtr($tDrop), _
                                            "int", DllStructGetSize($tDrop) _
                                            )
    $iCount = $aRet[0]
    ;get file paths
    For $i = 0 To $iCount-1
        $aRet = DllCall("shell32.dll", "int", "DragQueryFile", _
                                                "hwnd", $wParam, _
                                                "uint", $i, _
                                                "ptr", DllStructGetPtr($tDrop), _
                                                "int", DllStructGetSize($tDrop) _
                                                )
                                                
        $File = DllStructGetData($tDrop, 1)
        _move()
    Next
    ;finalize
    DllCall("shell32.dll", "int", "DragFinish", "hwnd", $wParam)
    Return
EndFunc

Func _exit()
    $pos = WinGetPos("[active]")
    
    IniWrite("config.ini", $GUI, "x", $pos[0])
    IniWrite("config.ini", $GUI, "y", $pos[1])
        
    Exit    
EndFunc
That's not exactly what i mean i mean that i make a explorer window with a title like Virtual Drive

and then if i drop files in it that it will encrypt them and that if i get them out that it will decrypt them


Share this post


Link to post
Share on other sites

forgive me for asking, but why not simply use TrueCrypt? It is powerful encryption tool, I mean seriously, best I know. It will do exactly the same as you described above.


My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
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
Sign in to follow this  
Followers 0