Drag & Drop Encrypt-Decrypt App

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
carno
Posts: 265
Joined: 20 Jun 2014, 16:48

Drag & Drop Encrypt-Decrypt App

25 Nov 2015, 17:04

I have the following script that works just fine. However, I would like to make it a Drag & Drop app so that rather than pasting text I can drop a text file and have the option to save the encrypted/decrypted file in a location I choose:

Code: Select all

; http://autohotkey.com/board/topic/90702-encrypt-decrypt-text/

; ===================================================================================
; AHK Version ...: AHK_L 1.1.11.01 x64 Unicode
; Win Version ...: Windows 7 Professional x64 SP1
; Author ........: jNizM
; Script ........: EnCrypt_DeCrypt.ahk
; Description ...: Encrypt & Decrypt Data
; License .......: WTFPL
; ===================================================================================

; GLOBAL SETTINGS ===================================================================

#NoEnv
#SingleInstance force

#Include Crypt.ahk
#Include CryptConst.ahk
#Include CryptFoos.ahk

; SCRIPT ============================================================================

Gui, Margin, 10, 10
Gui, Font, s10, Tahoma

Gui, Add, Edit, xm ym w300 h120 vStr, En/DeCrypt
Gui, Add, Edit, xm y+5 w300 vStr2, Password
Gui, Add, Edit, xm y+10 w300 h120 vEnDeCrypt ReadOnly
Gui, Add, DropDownList, xm y+5 w300 AltSubmit vEncryption, RC4 (Rivest Cipher)
    |RC2 (Rivest Cipher)
    |3DES (Data Encryption Standard)
    |3DES 112 (Data Encryption Standard)
    |AES 128 (Advanced Encryption Standard)
    |AES 192 (Advanced Encryption Standard)
    |AES 256 (Advanced Encryption Standard)||
Gui, Add, Button, xm-1 y+5 w100, Encrypt
Gui, Add, Button, xm+201 yp w100, Decrypt

Gui, Show,, En/DeCrypt
Return

ButtonEncrypt:
    Gui, Submit, NoHide
    GuiControl,, EnDeCrypt, % Crypt.Encrypt.StrEncrypt(Str, Str2, Encryption, 1)
Return

ButtonDecrypt:
    Gui, Submit, NoHide
    GuiControl,, EnDeCrypt, % Crypt.Encrypt.StrDecrypt(Str, Str2, Encryption, 1)
Return

; EXIT ==============================================================================

GuiClose:
GuiEscape:
ExitApp

; LICENSE ===========================================================================
/*
            DO WHAT THE **** YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004
 
 Copyright (C) 2004 Sam Hocevar <[email protected]>
 
 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.
 
            DO WHAT THE **** YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
  0. You just DO WHAT THE **** YOU WANT TO.
*/
User avatar
Soft
Posts: 174
Joined: 07 Jan 2015, 13:18
Location: Seoul
Contact:

Re: Drag & Drop Encrypt-Decrypt App

25 Nov 2015, 21:56

I tweaked a while ago, hope it helps

https://www.autohotkey.com/boards/viewtopic.php?t=5838
AutoHotkey & AutoHotkey_H v1.1.22.07
carno
Posts: 265
Joined: 20 Jun 2014, 16:48

Re: Drag & Drop Encrypt-Decrypt App

25 Nov 2015, 22:09

Thanks, Drag & Drop works beautifully!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Decar, doodles333, mikeyww and 226 guests