Page 44 of 54

Re: AHK Studio

Posted: 28 Oct 2017, 08:45
by maestrith
what library? how are you defining the library in the code?

Re: AHK Studio

Posted: 28 Oct 2017, 08:57
by clow_yakayi
I added a Lib floder in the main script folder, and put in Gdip_All.ahk in the folder to use as a library. Only way that library shows up in the Studio explorer if that .ahk is put in the main AutoHotkey/Lib folder. Id like it to show up in the explorer when its in the main script lib folder
#include <Gdip_All>

Re: AHK Studio

Posted: 28 Oct 2017, 11:02
by joedf

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
put this at the beginning of the script?

Re: AHK Studio

Posted: 28 Oct 2017, 12:03
by Geramont
@nnnik: I installed AHK using the installer version, just a standard install...same install procedure on both machines, but on the one that is administrated by an admin ahk studio throws this error message. AHK studio is started from my user directory.

Scite4AutoHotkey runs fine on both machines, both running ahk 1.1.25. Scite4AutoHotkey is also started from my user directory.

Any hints?

Re: AHK Studio

Posted: 29 Oct 2017, 02:08
by nnnik
@Geramont can you run the following Script:

Code: Select all

Msgbox % A_AhkVersion

Re: AHK Studio

Posted: 30 Oct 2017, 10:32
by Geramont
@nnnik: This morning I did a fresh install of ahk 1.1.26.01. Then I ran the following

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

;Msgbox % A_AhkVersion A_AhkPath
Msgbox % A_AhkVersion
Which gave me this:

Started the skript by double clicking on the file name it tells me: 1.1.19.02
Started it from within scite4ahk by pressing F5: 1.1.26.01

AHK is installed in C:\Program Files\AutoHotkey\AutoHotkey.exe

So this makes me go "hmmmmmmm"...

AHK Studio still throws:
---------------------------
AHK-Studio.ahk
---------------------------
Error: Parameter #3 invalid.

Specifically: FR

Line#
3323: IfMsgBox,No
3324: Return
3325: filelist:=[],all:=SN(Current(1),"descendant-or-self::file")
3326: While,(aa:=all.item[A_Index-1]),ea:=XML.EA(aa)
3327: filelist[ea.filename]:=ea
3328: Close(0)
3329: For a,b in filelist
---> 3330: Loop,Files,b.dir "\" b.filename,FR

The program will exit.
---------------------------
OK
---------------------------

Re: AHK Studio

Posted: 30 Oct 2017, 11:47
by clow_yakayi
joedf wrote:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
put this at the beginning of the script?
that worked

Re: AHK Studio

Posted: 30 Oct 2017, 11:51
by clow_yakayi
clow_yakayi wrote:
joedf wrote:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
put this at the beginning of the script?
that worked
Nvm still same issue

Re: AHK Studio

Posted: 30 Oct 2017, 12:06
by maestrith
clow_yakayi wrote:
clow_yakayi wrote:
joedf wrote:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
put this at the beginning of the script?
that worked
Nvm still same issue
I have your script and it shows up in my Project Explorer

Re: AHK Studio

Posted: 30 Oct 2017, 12:20
by clow_yakayi
On my system if I have .ahk scripts in the scriptDir/Lib directory, those script functions do not apear in the library inside the code explorer. They only appear if it is in the userdir/lib or globaldir/lib

Re: AHK Studio

Posted: 30 Oct 2017, 12:25
by maestrith
Please take a screenshot if your screen and add in what it is you want and where you want it.

Re: AHK Studio

Posted: 30 Oct 2017, 12:31
by clow_yakayi
This is what happens when the UseDir/Lib is full, where code explorer library has functions
userdirfull.png
userdirfull.png (33.38 KiB) Viewed 4619 times
code explorer with usr dir.png
code explorer with usr dir.png (6.87 KiB) Viewed 4619 times

Re: AHK Studio

Posted: 30 Oct 2017, 12:33
by clow_yakayi
but when the UserDir/Lib is empty but the ScriptDir/lib is full, those libraries and their functions dont apear inside the code explorer lib tree
usrdir empty.png
usrdir empty.png (4.24 KiB) Viewed 4618 times
local dir full.png
local dir full.png (34.21 KiB) Viewed 4618 times
code explorer epty usr dir.png
code explorer epty usr dir.png (1.68 KiB) Viewed 4618 times

Re: AHK Studio

Posted: 30 Oct 2017, 12:35
by clow_yakayi
My setup is sort of redundant i understand I have AutoHotkey folder in the same place as AHK Folder, but this is more for future issues that can arise when i want to have a script and its lib in a specific non redundant location or even for portability reasons

Re: AHK Studio

Posted: 30 Oct 2017, 13:48
by nnnik
@Geramont you need to uninstall any kind of AHK installation you currently have on the PC and then install again - it seems that somehow you still have an old version installed.
This version will be used to execute files and is too old to run AHKStudio

Re: AHK Studio

Posted: 31 Oct 2017, 10:35
by dd900
Hey maestrith, just started using AhkStudio. So far I love it, thank you. I did notice however that if a class extends another class it does not show up properly in the lib tree. I can confirm removing the "extends classWhatever" fixes the problem and the class shows up as it should.

Re: AHK Studio

Posted: 02 Nov 2017, 12:23
by Geramont
@nnnik: Followed your hint. I checked both machines, only showed two different ahk versions. So I did a search on autohotkey*.exe and found the old exe which I then remembered that it was the first version I placed in another directory after playing with ahk for about an hour. I deleted it an everything works fine!
Thanks a lot!

Re: AHK Studio

Posted: 09 Nov 2017, 00:45
by Barney
Defining this hotkey won't make it show up in code explorer. I think it affects all hotkeys with "up" at the end
~Control UP::

Re: AHK Studio

Posted: 10 Nov 2017, 08:08
by maestrith
Barney wrote:Defining this hotkey won't make it show up in code explorer. I think it affects all hotkeys with "up" at the end
~Control UP::
Updated in the Beta Build Direct Zip Download

Re: AHK Studio

Posted: 10 Nov 2017, 10:22
by BriHecato
When I'm trying to run AHK-Studio from ahk file (not zip), I'm getting those errors:
Errors happened while trying to save lib\Menus.xml. Reverting to old version of the XML.
And next
Error: Menu does not exist.
Specifically: main
Line 5757: Gui,1:Menu,%menuname%
The current thread will exit.
Process and icon stays in system tray

The same happens when I'm running from unziped package.