9252Survive Posted March 9, 2016 Posted March 9, 2016 (edited) Hi All, Once again returning back to this great community for much needed help. I am sure that I wont be disappointed and you guys will point me in the right direction. To begin with, I am very new here and I have been learning AutoIT. Few months ago I was able to write a script to automate a program to perform some desired task and it has been working great. But, all hell broke lose when I moved this to a Windows 7 VM the script wont even perform the first key commands and after few changes in the code it started working but break intermittently also the compiled scripts wont work at all. Any help will be much appreciated. Edited March 11, 2016 by 9252Survive
AutoBert Posted March 9, 2016 Posted March 9, 2016 Quote C:\Users\Bert\AutoIt3.My\Temp\asdf.au3"(22,10) : error: can't open include file <_SingleScript.au3>. Why using a UDF wich isn't standard? And why this UDF isn't attached?
JohnOne Posted March 9, 2016 Posted March 9, 2016 (edited) EDIT: never mind. Edited March 9, 2016 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
water Posted March 9, 2016 Posted March 9, 2016 2 hours ago, 9252Survive said: But, all hell broke lose when I moved this to a Windows 7 VM the script wont even perform the first key commands and after few changes in the code it started working but break intermittently also the compiled scripts wont work at all. Can you please be a bit more specific what happens? Do you get any error messages, does the compiled script crash? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
9252Survive Posted March 9, 2016 Author Posted March 9, 2016 As you can see there are couple of winwaitactivate in the script...the script keeps waiting for the window even when the window is active and sometimes it detects some other window. The version which works perfectly wont go past that point and the only way I was able to get it working was by re declaring the variable that stores the window title by WinGetTitle("[ACTIVE]") ( $TalpacTitle2 = WinGetTitle("[ACTIVE]")) ( not the best way to do it but this is the only way I was able to get it to see the active window and move forward). Another way would be to create the array of absolute names and then loop through them. I haven't tried that yet but I am so confused now that why wont this work now. This has been working perfectly on workstations and the only difference now is that its on a WIN 7 Virtual Machine.
water Posted March 9, 2016 Posted March 9, 2016 You could add AutoItSetOption("TrayIconDebug", 1) at the top of your script so you can see the line number where the script is waiting when moving the mouse over the tray icon. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
9252Survive Posted March 9, 2016 Author Posted March 9, 2016 I have this in the script and it shows me where it is pausing. Is this not the same as yours? Opt("TrayIconDebug", 1) ;0=no info, 1=debug line info
9252Survive Posted March 9, 2016 Author Posted March 9, 2016 6 hours ago, AutoBert said: Why using a UDF wich isn't standard? And why this UDF isn't attached? AutoBert.... I wanted to use a UDF to keep only on instance running at a time and this seems to work really well. Is there a standard way to do this? Please advise. Thanks http://h--e.de/autoit/UDF/_SingleScript.html
water Posted March 9, 2016 Posted March 9, 2016 1 hour ago, 9252Survive said: I have this in the script and it shows me where it is pausing. Is this not the same as yours? Opt("TrayIconDebug", 1) ;0=no info, 1=debug line info I didn't check your code: tl;dr. As you know where the problem occurs you could use _ArrayDisplay to show the list of windows returned by WinList and check what AutoIt sees. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
AutoBert Posted March 9, 2016 Posted March 9, 2016 1 hour ago, 9252Survive said: AutoBert.... I wanted to use a UDF to keep only on instance running at a time and this seems to work really well. Is there a standard way to do this? Please advise. I use therefor _Singleton
9252Survive Posted March 10, 2016 Author Posted March 10, 2016 15 hours ago, water said: I didn't check your code: tl;dr. As you know where the problem occurs you could use _ArrayDisplay to show the list of windows returned by WinList and check what AutoIt sees. I think I found the problem ...testing now. But I will also use WinList to test in case the problem persists. Thanks
Exit Posted March 9, 2019 Posted March 9, 2019 On 3/9/2016 at 10:33 PM, 9252Survive said: http://h--e.de/autoit/UDF/_SingleScript.html Source location of _SingleScript() changed to: http://www.autoitscript.com/forum/index.php?showtopic=178681 App: Au3toCmd UDF: _SingleScript()
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