Sign in to follow this  
Followers 0
snowman533

[solved] Help!

6 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



yes thankyou very much, i changed $error and now it works perfect, wow, something so simple can stuff everything up, thanks again

solved


Intermediate AutoIt/Autohotkey User

Share this post


Link to post
Share on other sites

$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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0