noellarkin Posted October 3, 2023 Posted October 3, 2023 This is strange. I wrote this function: Func _AU3_RunScript($scriptstring) Local $ReturnValue = 0 Local $ScriptFile = _WinAPI_GetTempFileName(@TempDir, "~") FileWrite($ScriptFile, $scriptstring) Local $ScriptRunning = RunWait(@AutoItExe & ' /AutoIt3ExecuteScript "' & $ScriptFile & '"', @TempDir, @SW_HIDE) If $ScriptRunning = 0 Then FileDelete($ScriptFile) $ReturnValue = 1 Else ConsoleWrite("ScriptRunning:" & $ScriptRunning) EndIf Return $ReturnValue EndFunc And to test it: _AU3_RunScript('MsgBox(0, "this", "message")') When I run it from SCITE it runs just fine. No errors, shows the message box. When I compile it into an exe (using SCITE) and run the EXE file, I get an an error at `If $ScriptRunning = 0 Then` - - I'm getting $ScriptRunning = -1 What am I missing?
Solution Danp2 Posted October 3, 2023 Solution Posted October 3, 2023 noellarkin 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now