Page 1 of 1

Compiled exe file has [Script Parameters] bug

Posted: 20 Feb 2019, 00:05
by rodemp
CompiledScript.exe [Switches] [Script Parameters]

Code: Select all

for n, param in A_Args  ; For each parameter:
{
    MsgBox "Parameter number [" n "] is [" param "]`n`nA_ScriptFullPath - " A_ScriptFullPath
}
Compiled file name is "ParamTest.exe"
ParamTest.zip
(1.02 MiB) Downloaded 131 times
When I drop another file into the compiled file, it looks like this ↓
1.png
1.png (16.29 KiB) Viewed 3373 times
And when I drag and drop two or more files, it looks like this ↓
2.png
2.png (55.82 KiB) Viewed 3373 times
There seems to be a problem with a_args as well as a problem with directory properties

Re: Compiled exe file has [Script Parameters] bug

Posted: 21 Feb 2019, 21:51
by HotKeyIt
Can you try latest version, there was a bug that has been fixed now.
I could not reproduce that problem in latest version.

Re: Compiled exe file has [Script Parameters] bug

Posted: 22 Feb 2019, 01:40
by rodemp
HotKeyIt wrote:
21 Feb 2019, 21:51
Can you try latest version, there was a bug that has been fixed now.
I could not reproduce that problem in latest version.
Oh I checked the bug with the version of ahk_h v2 There was no problem with ahk_h v1

Re: Compiled exe file has [Script Parameters] bug

Posted: 22 Feb 2019, 02:28
by HotKeyIt
Did it work as intended now with latest ahk_h v2?

Re: Compiled exe file has [Script Parameters] bug

Posted: 23 Feb 2019, 21:31
by rodemp
HotKeyIt wrote:
22 Feb 2019, 02:28
Did it work as intended now with latest ahk_h v2?
I downloaded the new file and tried it, but there was still a bug

https://www.autohotkey.com/boards/viewtopic.php?f=65&t=28803

Download AutoHotkey_H v2
ParamTest.zip
(1.02 MiB) Downloaded 157 times

Re: Compiled exe file has [Script Parameters] bug

Posted: 24 Feb 2019, 06:44
by HotKeyIt
Works fine for me, what is the error?
Is this probably what you want?

Code: Select all

Loop % A_Args.MaxIndex()  ; For each parameter:
{
    MsgBox "Parameter number [" A_Index "] is [" A_Args[A_Index] "]`n`nA_ScriptFullPath - " A_ScriptFullPath
}

Re: Compiled exe file has [Script Parameters] bug

Posted: 06 Mar 2019, 00:51
by rodemp

Code: Select all

MsgBox "A_Args.maxindex() - " A_Args.maxindex() "`nA_ScriptFullPath - " A_ScriptFullPath "`nA_ScriptDir - " A_ScriptDir "`nA_ScriptName - " A_ScriptName
the script's path Properties changes to A_Args [1] when run with ahk_v2 h
aa.png
aa.png (15.61 KiB) Viewed 3196 times

Re: Compiled exe file has [Script Parameters] bug

Posted: 07 Mar 2019, 16:30
by HotKeyIt
I can't reproduce that, can you explain how you run the file?
Also your example picture shows all correct, or am I overlooking something?