Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/12/2022 in all areas

  1. I think you misunderstood the OPs problem. When IE is closed while the script is still running it will crash the next time it tries to access the IE object.
    1 point
  2. I mean look at the working section of code you have and compare it to what the help page is showing you... The RunWait help a little tough after looking because there are no SW_HIDE @ComSpec or @WorkingDir examples.. I did not notice that before, but the Run help remarks and example shows a little more with an opt flag included.. It takes time, looking around at other peoples code can be helpful too.. https://www.autoitscript.com/autoit3/docs/functions/Run.htm Also you should definately use the SciTE editor located here: https://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3.exe
    1 point
  3. Here is a valid (although ugly) Run line.. Run("cmd /c notepad.exe", @WorkingDir) ; opens notepad using console ; Using @WorkingDir ; Immediately runs the next line in the program or RunWait(@ComSpec & ' /c ' & 'notepad.exe', @WorkingDir, @SW_HIDE) ; opens notepad using cosole with @SW_HIDE flag so you will not see the console window ; Using @WorkingDir ; Waits for the program to close before continuing to the next line They are both functional ways to use run commands
    1 point
  4. JohnRichard Try this: #include <Array.au3> ;Only for array displaying Local $strComputer, $strInput $strComputer = (InputBox("List software","Enter COMPUTER NAME to query list of installed programs.")) If $strComputer = '' Then $strComputer = "\\" & @ComputerName & "\" ;current computer Else $strComputer = "\\" & $strComputer & "\" EndIf $return = _SoftwareInfo($strComputer) _ArrayDisplay($return, "Installed Programs") Func _SoftwareInfo($computer = $strComputer) Local Const $regkey = $computer & 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall' Local $key, $Count = 0, $avArray[1] While 1 $Count = $Count + 1 $key = RegEnumKey($regkey, $Count) If @error Then ExitLoop $line = RegRead($regkey & '\' & $key, 'Displayname') If @error Then ContinueLoop $line = StringReplace($line, ' (remove only)', '') $avArray[0] += 1 ReDim $avArray[$avArray[0] + 1] $avArray[$avArray[0]] = $line WEnd Return $avArray EndFunc
    1 point
×
×
  • Create New...