Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Requesting help with conditional statements

$
0
0
Hello:


  I'm looking for assistance with an AutoIt script that I'm working on.  I need to apply a firmware update on a number of SSDs.  A percentage of the drives already have the latest version.  Trying to use AutoIt to automate the install so that drives that need the firmware get it while those that don't are not patched.

Here is my script:

Run("Firmware_Update.exe")
Sleep (5000)
If WinWaitActive("Nothing To Update", "There are no SSDs on your system that need to be updated.") Then
Send("{ENTER}")
Else
WinWaitActive("Crucial SSD Firmware Update Utility", "This program will update the firmware on your Crucial SSD.")
Send("{TAB}{ENTER}")
WinWaitActive("Crucial SSD Firmware Update Utility", "PLEASE READ THIS LICENSE AGREEMENT")
Send("{TAB}{TAB}{ENTER}")
WinWaitActive("Crucial SSD Firmware Update Utility", "This program will update the firmware on your Crucial SSD.")
Send("{TAB}{TAB}{ENTER}")
EndIf

On systems that have the latest firmware this script allows the update program to simply close.  That is great.  However, on systems that need the update this script simply stalls on the first screen.  (Attachted:  instead of selecting the "License" button the program just sits there.).  If I run the code within the "Else... EndIf" clause as a separate script then the update works fine.  Clearly, I have not written the first conditional properly.  Would be grateful for any assistance.  Thanks a lot.

Attached Thumbnails

  • Crucial-firmware-update-1.PNG

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>