Jump to content

[solved] Help!


Recommended Posts

Func troubleshootWin()
$window=InputBox("error logger", "what is the title of the window appearing with the error?" & @lf & "Please type it exactly as you see the title, example: BiTComet or BITCOMET or bitcomet is not the same as BitComet")
$file=InputBox("Save Error As","what would you like to save the error recorded as?" & @lf & @lf & "Example: error.txt" & @lf & @lf & "File will be saved to desktop")
$error=WinGetText($window)

_FileCreate(@desktopdir & "\" & $file)
FileWriteLine(@desktopdir & "\" & $file, $error)
EndFunc

the line that is giving me the error is:

$error=WinGetText($window)

this is being used as a function

as a standalone app this code works fine

in case you are wondering, i already have:

#Include <File.au3>

why would it give me that error while i am trying to use this as a function? but not while it is stand-alone app?

the function works perfectly up until i specify the name of the file to save the window contents to, then it gives the error

Edited by snowman533

Intermediate AutoIt/Autohotkey User

Link to comment
Share on other sites

  • Developers

$error is declared as a const in WindowsConstants.au3 for some reason

True and is already changed into the below for the next version:

Global Const $ERRORREGION = 0

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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