AHK Portable Installer v1.29
Re: AHK Portable Installer v1.20
Thanks man, appreciate the kind and understanding words - always feel I waste the time of you ahk gurus by asking dumb Qs and doing dumb things - appreciate it .
Re: AHK Portable Installer v1.20
LOL ... if you were the only to have ever done something "dumb" then I might agree, but you are definitely NOT the only one to have "learned by making mistakes".
That is (one of) the way(s) of the computer geek.
« AHK Portable Installer » | « CallTipsForAll » | « TheArkive AHK v1 Scripts » | « TheArkive AHK v2 Scrpts » | « TheArkive on GitHub »
Re: AHK Portable Installer v1.20
Right, I'm back . Part of the process which allowed me to solve my own goof on file associations, was to completely remove ahk-pi-master. So I've tried putting it all back and I can't get anything to work . My ahk-pi-master folder structure looks like:
I believe I've followed the setup instructions carefully to populate each of the version folders and to make the AHK Portable Installer.exe. When I run this exeI get the follwoing message: And when I say Try to Continue I get: and clicking on OK gives me:
.....
I believe I've followed the setup instructions carefully to populate each of the version folders and to make the AHK Portable Installer.exe. When I run this exeI get the follwoing message: And when I say Try to Continue I get: and clicking on OK gives me:
.....
Re: AHK Portable Installer v1.20
Again, sorry to ping you on this, but very grateful if you can put me on the right tracks.
Cheers, Dave.
Re: AHK Portable Installer v1.20
@DaveT1
I need to know this info:
I'll try to induce some errors to replicate what you have found. In the meantime answer my questions above and we'll see if we can get you up and running again.
I need to know this info:
- Are you setting this up on the same system or a different system?
- Are you trying to install the ahk file associations? Or are you running in "Fully Portable Mode" this time?
- In what location (directory) did you put ahk-pi-master?
- Also, are you using AHK beta.1 or beta.2 for the EXE?
- Is there anything preventing you from right-clicking on the EXE and selecting "Run as Administrator"?
I'll try to induce some errors to replicate what you have found. In the meantime answer my questions above and we'll see if we can get you up and running again.
« AHK Portable Installer » | « CallTipsForAll » | « TheArkive AHK v1 Scripts » | « TheArkive AHK v2 Scrpts » | « TheArkive on GitHub »
Re: AHK Portable Installer v1.20
Thanks so much for getting back to me
Hope that's all useful to getting this noob up and running? Really appreciate the help.
Same system - Windows 10 Pro, X-64. My personal laptop.Are you setting this up on the same system or a different system?
I'm trying to use it in the "Installer Mode" and want to use the #REQUIRES directive in each script.Are you trying to install the ahk file associations? Or are you running in "Fully Portable Mode" this time?
Ah, this might be a possible issue - I've currently got it in "C:\Program Files\ahk-pi-master"!!In what location (directory) did you put ahk-pi-master?
beta.2Also, are you using AHK beta.1 or beta.2 for the EXE?
Err, nothing other than not knowing this was a thing . Just tried it now and no longer get the access denied message, nor get this subsequent popup:Is there anything preventing you from right-clicking on the EXE and selecting "Run as Administrator"?
Right so I moved it off C: where I seem to need to be an administrator to do anything, and put it on D:. I then right click on "AHK Portable Installer.exe", run as administrator and, with no other pop-up / warning etc., get to here: So that feels better!? But still nothing in the top LV and a warning about version mis-matchThe fact that you got "access denied" means you put it in a location you can't write to, that isn't going to work well.
Hope that's all useful to getting this noob up and running? Really appreciate the help.
Re: AHK Portable Installer v1.20
If you moved the ahk-pi-master folder to a location that doesn't need admin privileges you don't need to right-click > Run as admin.
Did you specify a folder for the base folder in the Basics tab?
Did you specify a folder for the base folder in the Basics tab?
« AHK Portable Installer » | « CallTipsForAll » | « TheArkive AHK v1 Scripts » | « TheArkive AHK v2 Scrpts » | « TheArkive on GitHub »
Re: AHK Portable Installer v1.20
Also, there have been some issues found with beta.2 ... ya might want to stick with beta.1 ... i haven't had a chance to thoroughly test beta.2 yet.
EDIT: ,.. meaning, the exe used to launch the script, you may want to replace that one with a beta.1 EXE.
EDIT: ,.. meaning, the exe used to launch the script, you may want to replace that one with a beta.1 EXE.
« AHK Portable Installer » | « CallTipsForAll » | « TheArkive AHK v1 Scripts » | « TheArkive AHK v2 Scrpts » | « TheArkive on GitHub »
Re: AHK Portable Installer v1.20
Right, I'll give that a go a bit later today and report back - thanks for the amazing (near real-time) help
Re: AHK Portable Installer v1.20
What does your Basics tab look like?
« AHK Portable Installer » | « CallTipsForAll » | « TheArkive AHK v1 Scripts » | « TheArkive AHK v2 Scrpts » | « TheArkive on GitHub »
Re: AHK Portable Installer v1.20
(as a minor aside I was expecting the "X" to the right of the Text Editor box to delete whatever text editor was currently showing. But clicking the "X" doesn't seem to do anything?)
Re: AHK Portable Installer v1.20
The x puts the default back to notepad.exe which would have no effect on whether the main LV populates downloaded/chosen versions.
So... In your script dir for ahk-pi, there should be a versions folder with your chosen versions of AHK. Or, that folder should be empty if its a fresh copy of ahk-pi. Do you have anything in the versions folder like one of your previous screenshots suggest?
So... In your script dir for ahk-pi, there should be a versions folder with your chosen versions of AHK. Or, that folder should be empty if its a fresh copy of ahk-pi. Do you have anything in the versions folder like one of your previous screenshots suggest?
« AHK Portable Installer » | « CallTipsForAll » | « TheArkive AHK v1 Scripts » | « TheArkive AHK v2 Scrpts » | « TheArkive on GitHub »
Re: AHK Portable Installer v1.20
Brilliant - thanks for explaining thatThe x puts the default back to notepad.exe which would have no effect on whether the main LV populates downloaded/chosen versions.
I did a complete fresh install, so initially there was no versions folder. So then created a versions folder and populated it: And I think that I followed your instructions for v2 folder setup - though am now surprised there are files in the v2 Compiled other than Ahk2Exe.exe!So... In your script dir for ahk-pi, there should be a versions folder with your chosen versions of AHK. Or, that folder should be empty if its a fresh copy of ahk-pi. Do you have anything in the versions folder like one of your previous screenshots suggest?
I still need to try reverting to v2 beta.1 though. I should be able to get to that later today.
Re: AHK Portable Installer v1.20
Wait a minute. Your 2 folders of AHK in the versions folder have no variation of AutoHotkey.exe?
At a minimum:
AHK v1 folder should have:
More questions:
At a minimum:
AHK v1 folder should have:
- AutoHotkeyA32.exe
- AutoHotkeyU32.exe
- AutoHotkeyU64.exe
- AutoHotkey32.exe
- AutoHotkey64.exe
More questions:
- How did you manage to not have those EXE files available in the folders?
- I ask because if you downloaded the zip files manually or through the GUI, those EXEs are there. - Did you download the zip files manually?
- Did you download through the Downloads tab in the ahk-pi GUI?
- Are you running some kind of antivirus or antimalware program?
- It is possible a false positive was detected and the EXE files have been quarantined by your anti-whatever program.
« AHK Portable Installer » | « CallTipsForAll » | « TheArkive AHK v1 Scripts » | « TheArkive AHK v2 Scrpts » | « TheArkive on GitHub »
Re: AHK Portable Installer v1.20
Right, time for (another ) mea culpa....seems like I didn't realise that "Now you can download AutoHotkey through the UI. Just click Settings, pick a major version from the DropDownList, then select/downlad your desired version(s)." meant that ahk-pi-master would download and install whichever selected version into the ahk-pi-master\...\versions base folder . I'd been trying (and mostly failing) to build these version folders manually .
So,with that 'cluster*&^%' all cleared up - much kudos to TheArkive , I now seem to be in a fully working condition .
But, if you're still in anyway motivated to still help this utter noob, then, for a simple script like
Toggeling between these two work like a charm when I double click the script filename in Explorer.
But when I try to run and/or debug this little script in my chosen editor (eg., SciTE4AutoHotkey or VS Code), the message boxes both say that "C:\Program Files\AutoHotkey\AutoHotkey.exe" is being used, or, if the code comments are toggled the other way, give a warning that there is no v2 to use. So I'm guessing that internally these editors will have settings that point the editor to the original AHK installation directory and not to ahk-pi-master\...\versions.
So, assuming I can find these settings / they're exposed to the user, then hopefully I can manually edit these to point the editor to the required ahk-pi-master\...\versions, thereby allowing the editors to use my choosen version. Do that sound like the right thing to do? If this is possible, then it does suffer the problem of manually changing the settings in the editor!!
Thanks for all the help and very sorry for going a long way down the wrong rabbit hole!
So,with that 'cluster*&^%' all cleared up - much kudos to TheArkive , I now seem to be in a fully working condition .
But, if you're still in anyway motivated to still help this utter noob, then, for a simple script like
Code: Select all
;~ #Requires AutoHotkey 2.0-beta.2
;~ MsgBox "Current version of AHK = " A_AhkPath " \ " A_AhkVersion
#Requires AutoHotkey 1.1.33
MsgBox, Current version of AHK = %A_AhkPath%\%A_AhkVersion%
But when I try to run and/or debug this little script in my chosen editor (eg., SciTE4AutoHotkey or VS Code), the message boxes both say that "C:\Program Files\AutoHotkey\AutoHotkey.exe" is being used, or, if the code comments are toggled the other way, give a warning that there is no v2 to use. So I'm guessing that internally these editors will have settings that point the editor to the original AHK installation directory and not to ahk-pi-master\...\versions.
So, assuming I can find these settings / they're exposed to the user, then hopefully I can manually edit these to point the editor to the required ahk-pi-master\...\versions, thereby allowing the editors to use my choosen version. Do that sound like the right thing to do? If this is possible, then it does suffer the problem of manually changing the settings in the editor!!
Thanks for all the help and very sorry for going a long way down the wrong rabbit hole!
Re: AHK Portable Installer v1.20
Well that's a relief! I'm still interested to find out how you manged to not have the EXEs in those sub-folders. I actually don't use the "download feature" that I created, because I do place my versions in a separate folder location, manually, but I don't omit the EXEs of course. I only added the download feature because I could, and it helped to lower the bar for over-all complexity of using the program. So, manually "curating" your collection of AHK versions to use on your system is not the issue (technically).
DaveT1 wrote: ↑19 Oct 2021, 05:06But, if you're still in anyway motivated to still help this utter noob, then, for a simple script like
Code: Select all
;~ #Requires AutoHotkey 2.0-beta.2 ;~ MsgBox "Current version of AHK = " A_AhkPath " \ " A_AhkVersion #Requires AutoHotkey 1.1.33 MsgBox, Current version of AHK = %A_AhkPath%\%A_AhkVersion%
Right off the bat, having 2 #Requires directives in one script (even if one is commented) is probably part of the problem. Even a commented out #Requires directive is parsed because most older versions of AHK don't support it. So I coded ahk-pi to parse even commented out #Requires directives. Although the way you crafted ;~... should mitigate this issue.
It is also important to point out that AFTER ahk-pi decides which EXE to use, the #Requires directive is used by AHK itself. The version of EXE that executes the script must be >= the version specified in the #Requires directive. So you need to be sure of what versions of AHK are in your versions folder.
Your usage of the #Requires directive is strict, and requires beta.2, therefore any other AHK v2 beta will not suffice. Did you in fact put beta.2 EXEs in the versions folder?
You would be better off with something like one of the top 2 examples below that are less restrictive:
Code: Select all
#Requires AutoHotkey 2.0- ; <--- this uses the latest ahk v2 beta found
#Requires AutoHotkey 2.0-beta ; <--- this is the same as above
#Requires AutoHotkey 1.1 ; <--- uses the latest AHK v1.1 found, not limited to 1.1.33
#Requires AutoHotkey 2 ; <--- this uses a release of ahk v2 that does not yet exist, a legit non-beta release
#Requires AutoHotkey 2.1 ; <--- this is the same as above, but requires non-beta v2.1 - which doesn't yet exist
The text editors do not "select" which version of AHK si used. This is done by the file type associations for the .ahk extension. You apply this extension to the system by selecting/installing/double-clicking on an item from the main list in ahk-pi. My program (ahk-pi) actually selects which EXE to use. If no #Requires directive is found, then the "default" version installed is used. If a #Requires directive is found then it attempts to find that latest version that matches the #Requires criteria. If the criteria is strict and requires a specific version, then that version is searched. If found, it is executed, if not you get an error message.
As for the "Autohotkey.exe is in use" error message, that is odd. AutoHotkey can be run in multiple instances of itself. Usually if a script is already running, it will tell you so, and ask if you want to replace the existing instance with a new instance. Post the error messages after trying some of what I've suggested above.
« AHK Portable Installer » | « CallTipsForAll » | « TheArkive AHK v1 Scripts » | « TheArkive AHK v2 Scrpts » | « TheArkive on GitHub »
Re: AHK Portable Installer v1.20
Only got there because of your patience ! However, now that I know how to use the ahk-pi Download facility, I immediately scrubbed all the manually created version folders and relied on ahk-pi to keep these done right. So I can't now to recall what I did! Whatever it was, it was nothing less that a massive brain-fart. Oh, and I'm so pleased you added the Download facility. Manually curating is clearly fine for those (of you) that know what you're doing .Well that's a relief! I'm still interested to find out how you manged to not have the EXEs in those sub-folders. I actually don't use the "download feature" that I created, because I do place my versions in a separate folder location, manually, but I don't omit the EXEs of course. I only added the download feature because I could, and it helped to lower the bar for over-all complexity of using the program. So, manually "curating" your collection of AHK versions to use on your system is not the issue (technically).
OK, understood. It does seem that the SciTE4AutoHotkey block comment style (;~...) doesn't cause an issue for the ahk-pi parser, but I get your general comment about not having more than one #Requires directive.Right off the bat, having 2 #Requires directives in one script (even if one is commented) is probably part of the problem. Even a commented out #Requires directive is parsed because most older versions of AHK don't support it. So I coded ahk-pi to parse even commented out #Requires directives. Although the way you crafted ;~... should mitigate this issue.
Right, that's a great point. But now that I exclusively only use the ahk-pi Download button, I think all the right .exe files for each AHK version should be present and correct?It is also important to point out that AFTER ahk-pi decides which EXE to use, the #Requires directive is used by AHK itself. The version of EXE that executes the script must be >= the version specified in the #Requires directive. So you need to be sure of what versions of AHK are in your versions folder.
Understood about being too strict - thanks for pointing that out. I've changed my little 'version' script accordingly.Your usage of the #Requires directive is strict, and requires beta.2, therefore any other AHK v2 beta will not suffice. Did you in fact put beta.2 EXEs in the versions folder?
...You would be better off with something like one of the top 2 examples below that are less restrictive:
Ah, I may have worded this badly and left it open to interpretation. I was intending to show the folder location of the .exe that was being used. Consider, for example, a script with the follwoing code:As for the "Autohotkey.exe is in use" error message, that is odd. AutoHotkey can be run in multiple instances of itself. Usually if a script is already running, it will tell you so, and ask if you want to replace the existing instance with a new instance. Post the error messages after trying some of what I've suggested above.
Code: Select all
#Requires AutoHotkey 1.1
MsgBox, Current version of AHK = %A_AhkPath%\%A_AhkVersion%
That why I thought those editors with a Run and/or Debug facility, must point that editor to which .exe to use? I spent some time digging through all the various files with SciTE4AutoHotkey. It seems that the _platform.properties file has the following:
Code: Select all
Compiler=$(AutoHotkeyDir)\Compiler\Ahk2Exe.exe
AutoHotkey=$(AutoHotkeyDir)\AutoHotkey.exe
Re: AHK Portable Installer v1.20
Ok .. didn't read your full reply yet but if you are using SciTE, then it may have it's own method of actually choosing an EXE to run a script, and I don't know what that framework is, or how/if it meshes with my ah-pi script.
EDIT: Specifically, if you are using SciTE to actually launch the script ...
EDIT: Specifically, if you are using SciTE to actually launch the script ...
« AHK Portable Installer » | « CallTipsForAll » | « TheArkive AHK v1 Scripts » | « TheArkive AHK v2 Scrpts » | « TheArkive on GitHub »
Re: AHK Portable Installer v1.20
Ok, so you would need to configure something in SciTE then, I'll need to research what that is exactly. Shouldn't be too hard. I'll post again once i find the right way to do this.
Worst case scenario, it might not be possible to take advantage of some of what ahk-pi offers when using SciTE. But I think I should be able to work with SciTE on this issue, since my ahk-pi script actually decides what exe to run. We just have to put in the proper command line to use in order to run the script with ahk-pi, then the #Requires directive will do the rest.
EDIT:
In regards to running the scripts by double-click or shortcut, that should not be an issue. Let me know if it is.
EDIT:
Just setup SciTE4AHK and tried running a simple script on my system, it didn't work. I'll have to mess with it to figure out how to get it to work.
EDIT:
If you like, I can help you setup Notepad++. That's what I use, and there is a plugin to press SHIFT+F5 to run a currently running script (it uses the system file associations). You can of course also setup syntax highlighting as well. There are some limited call tips available, but mostly for Ahk v1.
Worst case scenario, it might not be possible to take advantage of some of what ahk-pi offers when using SciTE. But I think I should be able to work with SciTE on this issue, since my ahk-pi script actually decides what exe to run. We just have to put in the proper command line to use in order to run the script with ahk-pi, then the #Requires directive will do the rest.
EDIT:
In regards to running the scripts by double-click or shortcut, that should not be an issue. Let me know if it is.
EDIT:
Just setup SciTE4AHK and tried running a simple script on my system, it didn't work. I'll have to mess with it to figure out how to get it to work.
EDIT:
If you like, I can help you setup Notepad++. That's what I use, and there is a plugin to press SHIFT+F5 to run a currently running script (it uses the system file associations). You can of course also setup syntax highlighting as well. There are some limited call tips available, but mostly for Ahk v1.
« AHK Portable Installer » | « CallTipsForAll » | « TheArkive AHK v1 Scripts » | « TheArkive AHK v2 Scrpts » | « TheArkive on GitHub »
Re: AHK Portable Installer v1.20
Man, you are truely the most helpful person! Where's the 'buy you a beer' button?!
I use the AutoHotkey Plus Plus VS Code extension, which has, as part of its settings, this: ...and this is where I imagine that if I manually change the Compile, Execute and Help paths to locations in ahk-pi\...\versions, I can change the version that VS Code uses for running and debugging (accepting that I'd have to manually swap back and forth as necessary?
Thus far, this aspect is working like a charm. I'll obviously keep an eye on it, fully anticipating that any issues will be on this side of my keyboard!In regards to running the scripts by double-click or shortcut, that should not be an issue. Let me know if it is.
I tend to use SciTE4AHK for quick scripts - it was the editor that I started with. But I'm trying to transition to VS Code in an effort to (a) use a tool that has a wider user-base and active development, and (b) it has version control built in (and I'm trying to learn to do the right thing and use this)!Just setup SciTE4AHK and tried running a simple script on my system, it didn't work. I'll have to mess with it to figure out how to get it to work.
EDIT:
If you like, I can help you setup Notepad++. That's what I use, and there is a plugin to press SHIFT+F5 to run a currently running script (it uses the system file associations). You can of course also setup syntax highlighting as well. There are some limited call tips available, but mostly for Ahk v1.
I use the AutoHotkey Plus Plus VS Code extension, which has, as part of its settings, this: ...and this is where I imagine that if I manually change the Compile, Execute and Help paths to locations in ahk-pi\...\versions, I can change the version that VS Code uses for running and debugging (accepting that I'd have to manually swap back and forth as necessary?