Analytics Posted May 12, 2020 Share Posted May 12, 2020 I have very straightforward script: it just opens app, sends a few keys combinations and closes app. For some reason, after app is opened and one key is sent- nothing happens after. i.e. app is not closed. So, I decided to setup debug environment (with the log file) and send _DebugOut text after each script action, but nothing happened - no log file is created. Moreover, when I commented line where app has to be opened - script keeps opening app. See attached script where action lines are commented (appname is just to conceal my real app's title; also, I compiled this script for execution). It seems like AutoIt is caching script somewhere... is this because of Debug environment setup ? Any suggestion ? Thanks test_3.au3 Link to comment Share on other sites More sharing options...
TheXman Posted May 12, 2020 Share Posted May 12, 2020 (edited) You are trying to write your log to "C:\Analytics\test.txt" Let me guess...the "C:\Analytics" folder does not exist. If it did, it would have created the file for you. It will not create the path to the file though. Edited May 12, 2020 by TheXman CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
Analytics Posted May 13, 2020 Author Share Posted May 13, 2020 Folder does exist, but no file is created (even if I'm creating just a blank test.txt file - nothing is writing into it). This is why I'm asking for help to find out what can be wrong. Link to comment Share on other sites More sharing options...
TheXman Posted May 13, 2020 Share Posted May 13, 2020 (edited) Look at your _DebugSetup statement below. Then look at the help file's definition of the parameters. Fix your_DebugSetup statement and it should work. HINT: You are missing a parameter. #include <WinAPIShellEx.au3> #include <Debug.au3> ;$sFile="C:\Users\Analytics\Documents\Repository\myfile.twbx" ;_WinAPI_ShellExecute($sFile, '', '', 'open') _DebugSetup("Check", 4, "C:\Analytics\test.txt", True) ; start displaying debug environment ;Local $hand = WinWaitActive("appname", 20) _DebugOut("Open") ;WinActivate("appname") ; interact with Tableau ;Send("{F5}") Sleep(3000) ;Send("^!S") _DebugOut("Save") ;WinClose($hand) _DebugOut("Close") #include <Debug.au3> _DebugSetup ( [$sTitle = Default [, $bBugReportInfos = False [, $vReportType = 1 [, $sLogFile = "" [, $bTimeStamp = False]]]]] ) Edited May 13, 2020 by TheXman CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
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