Jump to content

_DebugSetup function issue


Recommended Posts

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

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 by TheXman
Link to comment
Share on other sites

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 by TheXman
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...