-1

I try to generate exe file from ahk project file. I use Ahk2Exe v1.1.30.03_Beta_9.

Ahk file, which should paste file path to browser's file chooser dialog window:

#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.

#Persistent

SetTimer, test, 500
return

test:

IfWinExist, Open
{
    WinActivate  ; Automatically uses the window found above.
    WinMaximize  ; same
    Send, ^v .{Enter}
    return
}

Symantec Endpoint Protection is blocking access to it with following reason:

Scan type: Auto-Protect Scan Event: Security Risk Found! Security risk detected: Heur.AdvML.B

plaidshirt
  • 5,189
  • 19
  • 91
  • 181
  • Is there any reason you're compiling it to an executable? Maybe just install AHK and run your .ahk extension file? Or if you want to compile it for whatever reason, I can't say anything about that beta compiler you're using, maybe just install AHK and use AHK's own compiler (create an .ahk file and right click compile it) – 0x464e Jan 30 '20 at 12:02
  • @0x464e : I would like to execute it from Selenium WebDriver testscript to handle browser dialog window. Is it possible in other way? – plaidshirt Jan 30 '20 at 12:24
  • I'm not familiar with Selenium WebDriver. Could you try to explain the problem in a way so I can understand and maybe try to help. – 0x464e Jan 30 '20 at 12:40
  • @0x464e : I call an exe like this: `String autoITExecutable = "C:\\_privat\\filechooser.exe \"" + fileSource + "\""; SECONDS.sleep(4); try { Runtime.getRuntime().exec(autoITExecutable); } catch (IOException e) { e.printStackTrace(); }` How could I do the same with an ahk file? – plaidshirt Jan 30 '20 at 12:58

1 Answers1

1

I see you're using the ahk2exe pre-release ;)

Unless your system has been compromised, this is very likely a false positive. You could try redownloading it, and compiling again:

That said, you can refer to the following documentation on AutoHotkey false positives:

Joe DF
  • 5,438
  • 6
  • 41
  • 63