Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

How can i convert my autohotkey.exe file back to .ahk file?


  • Please log in to reply
16 replies to this topic
sai05
  • Members
  • 1 posts
  • Last active: Nov 05 2011 07:46 AM
  • Joined: 05 Nov 2011

an example,
save this script and Exe2ahk.exe somewhere in a folder , make a link to this script
put your example test.exe to desktop, run script, select test.exe >> creates test.ahk

;-- this script in same folder as exe2ahk.exe  ----------------
;-- http://www.autohotkey.com/download/Exe2Ahk.exe ---
setworkingdir,%A_scriptdir%
searchfolder=%A_desktop%             ;-- search from here --
FileSelectFile, F1, 3,%searchfolder%, Please select file ..., AHK exe-files (*.exe)
if F1=
   return
SplitPath, F1, name, dir, ext, name_no_ext, drive
ifexist,%dir%\%name_no_ext%.ahk
   msgbox, 262196,EXE2AHK,File %name_no_ext%.ahk already exist`nWant you convert anyway ?
ifmsgbox,NO
   return
else
  run,exe2ahk.exe "%f1%"
return

result test.ahk
; <COMPILER: v1.0.48.5>
msgbox,hallo
return


not working for me please any how to convert back to .ahk

garry
  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005
it works [AHK_BASIC] when xy.exe was not compiled with password
;--------- [AHK_BASIC ]
;-- converts xy.exe to xy.ahk if not password protected ----
;--
;-- for test create a small script
;-- test.ahk
;-- and convert with rightclick to >
;-- test.exe
;-- delete test.ahk
;-- start this script and fileselectfile test.exe > compile it to test.ahk , if exist to test.new


setworkingdir,%A_scriptdir%
URL=http://www.autohotkey.com/download/Exe2Ahk.exe
Pr1=%A_scriptdir%\Exe2Ahk.exe
ifnotexist,%pr1%
  urldownloadtofile,%url%,Exe2Ahk.exe

searchfolder=%A_desktop%             ;-- search from here --
FileSelectFile, F1, 3,%searchfolder%, Please select file ..., AHK exe-files (*.exe)
if F1=
   return
SplitPath, F1, name, dir, ext, name_no_ext, drive
ifexist,%dir%\%name_no_ext%.ahk
   msgbox, 262196,EXE2AHK,The file`n%name_no_ext%.ahk`nalready exist`nWant you convert anyway ?`nIt creates the file`n%name_no_ext%.NEW
ifmsgbox,NO
   return
else
  run,exe2ahk.exe "%f1%"
return