redrum Posted March 7, 2015 Share Posted March 7, 2015 Hello, I've been using UI Automation for awhile now with success, but have an "undeclared variable error" that has been showing up that I cannot determine the cause of. I've reduced a script down to just the code that illustrates the issue - Attached. This script only has functions, for function keys F1 and F2. F1 reads a value at a screen coordinate and assigns it to a variable. Then, F2 code is supposed to be able to use the value of this variable - but in the F2 code, it fails to write to the console with an "undeclared variable" error. Also attached, is a notepad file with the output to the console when I run F1 followed by F2 with a blank (desktop) main display. I think it can be run with anything in the main display, and will still illustrate the issue. Any help/direction on this will be appreciated, I've been battling this issue for several days and cannot isolate the cause. Thanks, Doug UI Data Capture Issue.au3Undeclared Variable Issue Console Output.txt Link to comment Share on other sites More sharing options...
LarsJ Posted March 8, 2015 Share Posted March 8, 2015 Place the globals before the While loop. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
redrum Posted March 8, 2015 Author Share Posted March 8, 2015 Thanks LarsJ Can't believe the time I spent on that - lesson well learned! Regards, Doug 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