AHK-Virtual-Desktop-Library icon indicating copy to clipboard operation
AHK-Virtual-Desktop-Library copied to clipboard

[Small Fix] '#Include' fails

Open LegitCamper opened this issue 2 years ago • 2 comments

I had an issue with my ahk 'Include' function. For some reason it did not like: 'lib\AHK-Virtual-Desktop-Library\Main.ahk' as mentioned in the default config you provided. I did however get it to work with the addition of '%A_ScriptDir%\lib' witch makes the full line look like: '#Include %A_ScriptDir%\lib\AHK-Virtual-Desktop-Library\Main.ahk'. I had to make this change in every include function in the Main.ahk file as well. This is a small addition to the file and should not break anything. 'A_ScriptDir' is just an alias for the directory the script is running in.

image

I also have an issue running other functions. the only function I can run is 'e::DesktopManager()' all the other functions don't run but ahk starts without notifying me with any syntax errors. I though this could be because I am using Windows 11. I download the DLL from 'https://github.com/skottmckay/VirtualDesktopAccessor' Just do be sure. I still cannot get them to work.

As far as I can tell from my time; you have the best repo for all the scripts I need in one place. I cannot wait to get everything all running :) I appreciate your time that went into this project.

LegitCamper avatar Jul 04 '22 05:07 LegitCamper

Hiii!!! Your script connects to the AHK-Virtual-Desktop-Library, and that library connects to the VirtualDesktopAccessor.dll, and that .dll connects to Windows

if you don't get any errors from ahk its very likely that the library cannot connect to the .dll or the .dll cannot connect to Windows

If the dll cannot connect to windows:

  1. it might not be the right one, or it might not be updated to the version of windows: first of all, the original author of VirtualDesktopAccessor.dll is Ciantic, and the official repo is https://github.com/Ciantic/VirtualDesktopAccessor I know you are using a fork, but I can't guarantee that https://github.com/skottmckay/VirtualDesktopAccessor will work correctly. Also, @itzjakm was successful in using a VirtualDesktopAccessor.dll that works with windows 11, if I'm not mistaken he got it from the original author....I would be amazing to know where he got it, for future people

  2. also for the .dll to be able to "connect" to windows you also need: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

If the library can't connect to the .dll:

  1. You probably mess up the paths inside the library, I made the mistake of not explaining this in the installation, I will fix it if that is the problem: the code block you show: put everything as it was and at the top of your script put: SetWorkingDir %A_ScriptDir% read in google what it does

  2. Make sure that in the line 5 of Main.ahk has the right path to the .dll

PLEASE if you fix it tell me what it was, some people fix things and never tell me, even if the problem was installation interpretation I can improve that in read.me

Translated with www.DeepL.com/Translator (free version)

adrian88888888 avatar Jul 04 '22 20:07 adrian88888888

I used https://github.com/skottmckay/VirtualDesktopAccessor. Different versions are in the commits

itzjakm avatar Jul 05 '22 15:07 itzjakm