snowman533 Posted April 12, 2009 Share Posted April 12, 2009 (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 April 12, 2009 by snowman533 Intermediate AutoIt/Autohotkey User Link to comment Share on other sites More sharing options...
Developers Jos Posted April 12, 2009 Developers Share Posted April 12, 2009 Have you declared $error somewhere as Const? 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 More sharing options...
snowman533 Posted April 12, 2009 Author Share Posted April 12, 2009 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 Link to comment Share on other sites More sharing options...
ChrisL Posted April 12, 2009 Share Posted April 12, 2009 Have you declared $error somewhere as Const?$error is declared as a const in WindowsConstants.au3 for some reason [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Developers Jos Posted April 12, 2009 Developers Share Posted April 12, 2009 $error is declared as a const in WindowsConstants.au3 for some reasonTrue 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 More sharing options...
ChrisL Posted April 12, 2009 Share Posted April 12, 2009 True and is already changed into the below for the next version: Global Const $ERRORREGION = 0 Jos Great [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire 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