While back someone posted a script that would make an ahk script run as an exe, no compile needed.
Now I wish to try it but cannot find it anywhere using any search terms.
Have any members have a link or the code?
Make ahk run as exe
-
- Posts: 51
- Joined: 02 Oct 2017, 07:58
Re: Make ahk run as exe
Use SciTE4AutoHotkey program, its similar to notepad but it's made specially for AHK. From there you can run the script as EXE for testing.
Re: Make ahk run as exe
Thx for reply but looking for for a script someone posted that would let an "AHK script run as an exe". Standalone not testing.
Re: Make ahk run as exe
What do you mean with "make an ahk script run as an exe, no compile needed"?
That just doesn't make sense to me. Of course you can run AHK as an exe, but without compiling there is just no exe file to run. an ahk-file is just a text file, it cannot be executed without an interpreter like autohotkey.exe. That's why the ahk installer connects the ahk file extension with autohotkey.exe.
Perhaps you mean that you can rename a copy of Autohotkey.exe to the same name like your script and then run this renamed exe without actually compiling your .ahk-script: example.exe would then start example.ahk in the same folder...
Btw, compiling an ahk script just bundles together the script text file with autohotkey.exe in one file, anyway (and of course, include-files are added, too)
That just doesn't make sense to me. Of course you can run AHK as an exe, but without compiling there is just no exe file to run. an ahk-file is just a text file, it cannot be executed without an interpreter like autohotkey.exe. That's why the ahk installer connects the ahk file extension with autohotkey.exe.
Perhaps you mean that you can rename a copy of Autohotkey.exe to the same name like your script and then run this renamed exe without actually compiling your .ahk-script: example.exe would then start example.ahk in the same folder...
Btw, compiling an ahk script just bundles together the script text file with autohotkey.exe in one file, anyway (and of course, include-files are added, too)
Last edited by gregster on 03 Oct 2017, 18:17, edited 1 time in total.
Re: Make ahk run as exe
as mentioned someone wrote the code earlier, now looking for it. Not sure why u answered but do not have an answer.
Re: Make ahk run as exe
You are not making sense. How do you run a text file? "Standalone" as you say... exe, but not compiled...?!?
Re: Make ahk run as exe
I do not understand why u reply without an answer? If it don't make sense to you, don't answer with a non answer. Let someone else.
Re: Make ahk run as exe
I just explained to you the options you have. If you would explain what your actual goal is, it would probably help "someone else", too, to help you. But running a pure text file without an interpreter in some form (or without compiling it) is like being a little bit pregnant... just doesn't happen.
Re: Make ahk run as exe
plse do not reply, only looking for answers
Re: Make ahk run as exe
Sure, but what is the question?
Re: Make ahk run as exe
After being unable in AHK community, I found his elsewhere
I believe the coding was in "rename.ahk".
Extract:
NewName := A_ScriptName ;-- Grabs current script name (script.ahk)
StringTrimRight, NewName, NewName, 3 ;-- Removes the AHK extension
NewName .= "exe" ;-- Appends EXE extension
I believe the coding was in "rename.ahk".
Extract:
NewName := A_ScriptName ;-- Grabs current script name (script.ahk)
StringTrimRight, NewName, NewName, 3 ;-- Removes the AHK extension
NewName .= "exe" ;-- Appends EXE extension
Re: Make ahk run as exe
Well, that's a new definition of "standalone"... and exe-file, too.
Re: Make ahk run as exe
And the answer is https://autohotkey.com/board/topic/3862 ... able-name/ by HotkeyIt.
Thx to gregster who egged me on so much I had to find it
Thx to gregster who egged me on so much I had to find it
Re: Make ahk run as exe
Always happy to help. That's why I asked what you were actually trying to do...
btw, i mentioned the technique used here of running a script by renaming (a copy of) autohotkey.exe, above.
btw, i mentioned the technique used here of running a script by renaming (a copy of) autohotkey.exe, above.
Re: Make ahk run as exe
You answered a that question that not asked. You didn't read the question and jumped to a conclusion. No technique was asked or requested.
Re: Make ahk run as exe
You found what you were looking for... so everything should be fine.
Just for clarification, because you still don't seem to realize: The link you provided doesn't show anything running "standalone" or "as an exe, no compile needed" . It just runs your ahk script (yes, the text file) by a (temporarily) renamed Autohotkey.exe so that you can see the script name in the task manager (instead of one or mulitiple instances of Autohotkey.exe, depending on how many scripts you are running at the same time) and better tell apart the processes of different running AHK scripts. You don't run your AHK script here as exe, at least not more or less than you would do without the provided function. You still need Autohotkey.exe to start the function call and also to temporarily rename it and then actually use it to run your script like you would always do (just done by the function call).
So, your provided answer was to a different question than you asked. I just pointed out that you were probably looking for something else and even hinted at the possibility to rename Autohotkey.exe, although not specifically mentioning the consequence that it would also rename the process (which shouldn't be surprising), because there was no clear indication what you were aiming at. Just don't shoot the messenger...
Just for clarification, because you still don't seem to realize: The link you provided doesn't show anything running "standalone" or "as an exe, no compile needed" . It just runs your ahk script (yes, the text file) by a (temporarily) renamed Autohotkey.exe so that you can see the script name in the task manager (instead of one or mulitiple instances of Autohotkey.exe, depending on how many scripts you are running at the same time) and better tell apart the processes of different running AHK scripts. You don't run your AHK script here as exe, at least not more or less than you would do without the provided function. You still need Autohotkey.exe to start the function call and also to temporarily rename it and then actually use it to run your script like you would always do (just done by the function call).
So, your provided answer was to a different question than you asked. I just pointed out that you were probably looking for something else and even hinted at the possibility to rename Autohotkey.exe, although not specifically mentioning the consequence that it would also rename the process (which shouldn't be surprising), because there was no clear indication what you were aiming at. Just don't shoot the messenger...
Re: Make ahk run as exe
Your answer contained no "link"or "the code", as the question requested. Therefore you did not have the answer. You should have stayed out and let someone else answer. Instead you seen, something you could use to morph or hijack into something so you could show off your smarts.
Re: Make ahk run as exe
Ohh, Don, it is you!!!
Who is online
Users browsing this forum: No registered users and 268 guests