Hey guys. This is my first program in AHK. It isn't really completely done yet, but I would like you to test it.
Thanks to everyone who helped and will help
What it does is it uses a native Windows (DOS) command to "hide" any file in a picture. (It's best if you try zip / rar files). The new image created is recognized as a perfect jpeg from Windows. However, if you try to "Open with" with Winrar / Winzip, you will see the rar / zip file you hid inside.
Please tell me if it works on your pc's.
Thanks in advance!
Code:
#SingleInstance force
#NoTrayIcon
#NoEnv
SetBatchLines, -1
DetectHiddenWindows, On
SetTitleMatchMode, 2
Gui, +AlwaysOnTop +LastFound
Gui, Add, Edit, w400 cGray vPath1, Drag and drop the file to be hidden.
Gui, Add, Edit, w400 cGray vPath2, Drag and drop the 'hidding place' image.
Gui, Add, Button, w50 gGuiSubmit, OK
Gui, Add, Button, w50 gGuiClose x+10, Cancel
Gui, Font, Bold
Gui, Add, Text, w150 x+10 y65, Ready
Gui, Font, Norm
Gui, Show, xCenter yCenter, PicHid
GuiControl, Focus, OK
WinGet, WinID, ID
Return
GuiClose:
ExitApp
GuiDropFiles:
If A_EventInfo > 2
{
Gui, +OwnDialogs
MsgBox,48, PicHid, You need to drop two files.
Return
}
If A_EventInfo = 2
Loop,Parse,A_GuiEvent,`n,`r
{
GuiControl,Font,Path%A_Index%
GuiControl,,Path%A_Index%,%A_LoopField%
}
Else If (A_GuiControl="path1") OR (A_GuiControl="path2")
{
GuiControl,Font, %A_GuiControl%
GuiControl,,%A_GuiControl%,%A_GuiEvent%
}
Return
GuiSubmit:
GuiControlGet, path1
GuiControlGet, path2
GuiControl, Text, Ready, Working...
GuiControl, Disable, OK
GuiControl, Disable, Cancel
Command1 = COPY /B "%path2%" + "%path1%" "%A_ScriptDir%\newimage.jpg"
Sleep 100
Run, %comspec% /c %Command1%, , Hide ;see nothing
;Run, cmd, , ;Hide
;ControlSend, , COPY /B{Space}"%path2%", cmd
;ControlSend, , {Space}, cmd
;ControlSendRaw, , +, cmd
;ControlSend, , {Space}, cmd
;ControlSend, , "%path1%"{Space}"%A_ScriptDir%\newimage.jpg"{Enter}, cmd
Sleep 100
WinClose, cmd.exe
GuiControl, Enable, OK
GuiControl, Enable, Cancel
GuiControl, Text, Working..., Ready
MsgBox, , PicHid, The file was hidden successfully!
Return