Jump to content

AutoIT on Win 7 VM {.exe wont run}


Recommended Posts

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 by 9252Survive
Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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 

Link to comment
Share on other sites

  • 2 years later...

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

×
×
  • Create New...