Jump to content

_Ed_

Members
  • Posts

    5
  • Joined

  • Last visited

_Ed_'s Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I realize now, @ScriptName is useful for identifying whether a script is running as the "main" script or as #included. Thanks!
  2. ? If @ScriptName == "xyz.au3" Then ; running as "main" script Else ; running as #included EndIf
  3. My example above was in context of running an uncompiled script, using _DebugOut(@ScriptName&": "&@ScriptLineNumber) at line# 94 within common.au3 It produces a log statement like this: main.au3: 94 The line number is correct, but not the file name. I expect: common.au3: 94 If I put a pause right after the debug statement, i.e. "While True Sleep (100) WEnd" the AutoIt TrayIconDebug tooltip has correct file name for that paused position in script. I would expect @ScriptName or some other macro could provide same thing: The Au3Stripper tip for compilation is helpful, thanks. Running main.exe, I get: main.exe: common:94/19557 ... or if running main_stripped.au3: main_stripped.au3: common:94/19557 But this seems like an inefficient extra steps that must be done with every change to original files.
  4. For example, running "main.au3" with #include <common.au3"> ... main.au3 calls a function within common.au3. That function includes a debug statement that logs @ScriptName as "main.au3" instead of "common.au3". @ScriptLineNumber is logged as the correct line number within common.au3. And if script is paused at that point, the TrayIconDebug popup shows correct file name. Why doesn't @ScriptName have access to correct file name displayed in TrayIconDebug?
  5. @ScriptName and @ScriptFullPath is not correct when referenced within an #include file. @ScriptLineNumber is correct in those cases and TrayIconDebug shows the correct file name. Why aren't the others correct? Thanks!
×
×
  • Create New...