Sign in to follow this  
Followers 0
ahmeddzcom

File To Hex (Default Name + Drag & Drop)

1 post in this topic

#1 ·  Posted (edited)

Hello All

This my Simply Code :

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

$Form1 = GUICreate("File To Hex", 450, 50, -1, -1,-1, $WS_EX_ACCEPTFILES)
$Input1 = GUICtrlCreateInput("Drag & Drop File Here", 10, 10, 330, 30,1)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)

$Button1 = GUICtrlCreateButton("Open File", 350, 10, 90, 30)

GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg

        Case $GUI_EVENT_CLOSE
                Exit

        Case $GUI_EVENT_DROPPED

$read = FileRead(@GUI_DragFile)
$Hex = _StringToHex($read)
$open = FileOpen(@GUI_DragFile & ".txt", 2)
FileWrite($open, $Hex)

                GuiCtrlSetData($Input1, @GUI_DragFile & ".txt")

        Case $Button1
                $aFile = FileOpenDialog("", @DesktopDir & "\", "")

If @error Then
    Sleep(0)
Else
$read = FileRead($aFile)
$Hex = _StringToHex($read)
$open = FileOpen($aFile & ".txt", 2)
FileWrite($open, $Hex)
EndIf

    EndSwitch
WEnd

 

H.thumb.jpg.58ecc30f57cef5151def67ebf88a

:)

DownLoaD

File To Hex.au3

 

Edited by ahmeddzcom

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