Jump to content

Search the Community

Showing results for tags 'windows 10'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

  1. Features: Create modern looking borderless and resizable GUIs with control buttons (Close,Maximize/Restore,Minimize, Fullscreen, Menu) True borderless, resizeable GUI with full support for aerosnap etc. Many color schemes/themes included. See MetroThemes.au3 for more details. 3 type of Windows 8/10 style buttons. Modern checkboxes, radios, toggles and progressbar. All buttons, checkboxes etc. have hover effects! Windows 10 style modern MsgBox. Windows 10/Android style menu that slides in from left. Windows 10 style right click menu Credits: @UEZ, for the function to create buttons with text using GDIPlus. @binhnx for his SSCtrlHover UDF Changelog: Download UDF with example:
  2. traytip isn't working in windows 10. nothing happens when i use the Traytip command. here's a simple script i used: TrayTip("I'm a title", "I'm the message", 5) i tried changing the registry setting HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced ( which didn't have EnableBalloonTips) and creating a DWORD entry called EnableBalloonTips and setting it to 1 and logging off then back in. that did not resolve the problem. i'm running Windows 10 v1709 b16299.431
  3. Certainly! Automating the "Windows Fax and Scan" application in Windows 10 using AutoIt involves interacting with the GUI elements and performing actions like clicking buttons. Below is an example script to automate the "Scan" button in the "Windows Fax and Scan" application: Run("C:\Windows\System32\WFS.exe") ControlClick("Windows Fax and Scan", "", "[CLASS:Button; TEXT:Scan]") when i run this code but no activity .... i tried "AutoIt Window Info (x64)" but i unable to catch issue .... i will be very thankfull if somebody give me advice / hint ....
  4. Hello everyone. I always try to work with old Windows 10 versions as much as possible because I know mane compatibility issues with Windows 10 upgrading. But I couldn't do anything else (I got drivers problem), and nothing couldn't help me besides upgrading, so I upgraded from 1807 to 1903. And...get another problem 😃 I use AutoitX library in external project like this. ObjectAutoIt=New COMObject("AutoItX3.Control"); ObjectAutoIt.AutoItSetOption("WinTextMatchMode",2); While ObjectAutoit.WinExists("",WindowHeader) Cycle ObjectAutoIt.WinClose("",WindowHeader); EndCycle; After upgrade I get that this line code While ObjectAutoit.WinExists("",WindowHeader) become extremely low - ~ 20 seconds even if 10 windows open. But before upgrade it takes 0.5 s for a max. And every time that this code line passes through - it takes ~20s, (20.115, for example), not less, not more. Something pauses it to work. How can I diagnose, what is that? I tried reinstall whole AutoIt, but no results. Thanks to all.
  5. Hello, I am trying to use RegWrite to create a key within HKLM on W10 without success. I've had a look at a number of posts on the forum to troubleshoot, without success. This post seems highly relevant Here is my latest script with output ; Read/write data to registry #RequireAdmin Example() Func Example() Local $Status = "" ; Check if the registry key is already existing, so as not to damage the user's system. RegRead("HKLM\SOFTWARE\Microsoft\F1", "Key1") ConsoleWrite("Error: " & @error & @CRLF) ; Write a single REG_SZ value to the key "Key1". $Status = RegWrite("HKLM\SOFTWARE\Microsoft\F1", "Key1", "REG_SZ", "This is an example of RegWrite") ConsoleWrite("Status: " & $Status & @TAB & " Error: " & @error & @CRLF) EndFunc ;==>Example Output >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "D:\Temp\Macrium\Registry_write_read.au3" /UserParams +>16:18:46 Starting AutoIt3Wrapper (21.316.1639.1) from:SciTE.exe (4.4.6.0) Keyboard:00000409 OS:WIN_10/2009 CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\ZEN\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\ZEN\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.16.1) from:C:\Program Files (x86)\AutoIt3 input:D:\Temp\Registry_write_read.au3 +>16:18:47 AU3Check ended.rc:0 >Running:(3.3.16.1):C:\Program Files (x86)\AutoIt3\autoit3.exe "D:\Temp\Registry_write_read.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. Error: 0 Status: 1 Error: 0 +>16:18:47 AutoIt3.exe ended.rc:0 +>16:18:48 AutoIt3Wrapper Finished. >Exit code: 0 Time: 2.362 The user is a local admin. According to the script output, the regwrite call should have succeeded. SciTe has been runas admin. I've also tried compiling the script and running the resulting exe as admin. Obviously I can't see the consolewrite output when I do this, but if the function calls were working then the exe should update the registry. After suggestions as to options to try next. Also, I tried narrowing down the forum search using arguments like: "regwrite windows 10" or "regwrite windows10" and for some reason had no results on the search; so had to use more general search arguments. Would be interested to know why the above wouldn't work as a search argument. Thanks VW
  6. Hello everyone, I started this project alone in May 2020 as project in my spare time at work, I'm working for a IT company that started opening their services to residential customers few months ago and now my position in the company kind of drifted in the doom and gloom world of repetitive tasks like: Reinstallation + Configuration of Windows 10. The procedure is very repetitive and I started feeling like being a robot which is the main reason I started this project. ==============================FAQ================================== 1. Q: Do you want this project to be accomplished with the usage of AutoIt ONLY or 3rd party tools / Scripts (BATCH / POWERSHELL / VB) ? A: No, if I cannot find a way using AutoIt to accomplish a task I will move to my Plan B which consist of automating an 3rd party tool to accomplish the affected task until a solution is found. 2. Q: What do I get from helping/collaborating in this project? A: I will personally take the responsibility to mention you in the credits of this project. 3. Q: If I have more questions, can I ask? A: Certainly! feel free to ask any questions related to this project! 4. Q: What is the main goal of this project? A: Automating Windows 10 configuration without user interaction needed (as much as possible) ______________________________________________________________________________________________________________________________ Current progression of the project (more will be added in future) « Blue = Info || Yellow = Unfinished/Untested || Purple = Could be better || Green = Done ||Red = Not Yet Started » ***Very early Stage *** Connect Network Attached Storage(NAS) (Work but missing configuration in GUI - AutoIt only) Download & Install up to 600+ softwares (Tested & Working - using 3rd party tool + 50/50 Powershell/AutoIt) Auto prediction of Apps name of text typed inside input (Tested & Working - AutoIt Only) Change OEM Informations (Tested & Working - AutoIt) Disable hibernation (Tested & Working - AutoIt only) Change Computer Name (Work but require testing - AutoIt only) Show Computer Information and Smart status on GUI (Tested & Working - AutoIt Only) Change .pdf / .pdfxml from Edge to Adobe Reader DC (Tested & Working - using 3rd party tool) Change Edge to Google Chrome as Default Browser (Tested & Working - using 3rd party tool) Windows Updater (Seems to work but require further testing - AutoIt only) Install Office 365 / 2013 + Activation (To Do) Add L2TP VPN Configuration for Windows Built-in VPN (To Do) Save / Load tasks configuration profile in (.ini file) to avoid repeating same configuration twice (In progress - AutoIt Only) (EXPERIMENTAL) Install Apps from Microsoft Store with UIAutomation UDF made by @junkew(Work if you know what your doing) P.S: Installing Apps from Microsoft Store will require usage of UIA spy tool made by @LarsJ which you can download & learn how to use it on UIA Spy Tool thread. *** If this project interest you, Reply here This will greatly help me to see if you'd like this project to become real *** ______________________________________________________________________________________________________________________________ Best Regards, ~WilliamasKumeliukas
  7. Hi All, I'm not sure if its possible that I'm trying to achieve, I've looked into https://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/AutoIt3Wrapper.html and such resources for help, but I cant really find the answer to my question. So upon compiling the script in SciTE, the exe file is given a Description under file Properties>Details. I understand, that one can enter info manually there and it can even implement the version automatically with each compilation. What I'm trying to achieve is to somehow include the "@ScriptName" in the Details>File Description Field. But as I see no variable can be taken after "#" in this case. Do You think its achievable? (Win 10) Much obliged for taking time on reading this. Kind Regards, Brave
  8. Hi, I have a specific situation: Is it possible to run autoit script/.exe as a task which in turn is automating a desktop user interactive application on windows 10 where user will not be logged in - at best I can get user locked? If so how will this work or is there any tool available to do this? I am trying z-cron task scheduler but it runs only some part also I tried windows 10 task schedule with option to allow task to run which is user interactive type but that too does not work. Looking forward to hear from you to help me out of this situation. Thanks,
  9. So I have no example code currently because I'm not sure where to even start. We're using the parental controls on the computer and the kids each have their own user profiles with limited time. The problem we're encountering is when their time runs out, or if they just hit Win+L and leave the computer, their games are still running in the background. I was hoping to write up a quick AutoIt script and throw it in a recurring scheduled task to just sign off any of the kid's profiles that's not currently active. I found some suggestions to use "query session" and then "logoff [user]" in the command line (which it seems I could easily automate with AutoIt) but that's only available on Win Pro and this system is running Home (and I even tried copying the query.exe from a Pro system but it errors out). Is there some AutoIt equivalent to the query and logoff functions or am I stuck? Edit: I'm adding some clarification to exactly what I'm hoping to get out of this script. I'd like to setup a scheduled task that runs outside of the current user (perhaps under the SYSTEM account?) in case NO user is currently active, that will detect which users are currently signed in. If users from a predefined list are not currently active, sign them off entirely. So let me give two examples: Example #1: - I am logged in, but not active (I left my browser open and locked the computer) - Nephew A is logged in, but not active (his time ran out while his game was running and the computer auto-locked) - Nephew B is logged in, and currently playing a game When script runs, ignore my profile (leave it signed in), log out Nephew A (closing his game), and ignore Nephew B because he's actively using the computer. Example #2: - I am logged in - Nephew A is logged in - Nephew B is logged in - No users are currently active (Windows is sitting on the choose user / sign in screen) When script runs, ignore my profile, log out Nephew A and Nephew B. I would perceive pseudo code, going as such: $aChildUsers = [ 'NephewA', 'NephewB' ] $aUserList = GetSignedInUsers() For $i = 0 to UBound($aUserList)-1 If Not UserIsActive($aUserList[$i]) Then For $j = 0 to UBound($aChildUsers)-1 If $aUserList[$i] = $aChildUsers[$j] Then LogOffUser($aUserList[$i]) Next EndIf Next Obviously, GetSignedInUsers(), UserIsActive(), LogOffUser() are not real functions. What I'm searching for is something of their equivalent. Thanks for your time!
  10. I am not able to use the $GUI_READ_EXTENDED with the Metro UDF, any work around ? Local $aPos[2] = [$Radio1, $Radio2] For $Radio In $aPos If GUICtrlRead($Radio) = $GUI_UNCHECKED Then ContinueLoop IniWrite($sGUIstate_IniFile, "Data", "POS", GUICtrlRead($Radio, $GUI_READ_EXTENDED)) ;; return the text of the menu item ExitLoop Next
  11. With the imminent public release of Windows 10 I have been readying my test environments to be able to deploy and test Windows 10. This is a quick overview of the main deployment scenarios supported and some links to thesoftware you will need. Also I’ve included some links to a selection of videos from the MS Ignite conference that I found the most useful for someone new to Windows 10 deployment. Deployment Scenarios The main deployment scenarios are:Wipe and LoadIn-place UpgradeProvisioning Wipe and LoadThis is the traditional process and follows these general stages:Wipe deviceDeploy customised OS imageInject driversInstall applicationsOptionally this can include steps to capture and restore user data and/or settings if present on the device (usually laptops). Wipe and Load can be done with both MDT and ConfigMgr. ProsDevice will be in a known new stateRemoves any remnants of old installations, updates and obsolete applications. Over months and years performance and disk space can be adversely affectedCan use a custom image that could be pre-updated, or contain applications that rarely change - this can drastically improve deployment timesConsCan have a longer deployment time due to re-installation of all applications post-deploymentMust have driver packages available for all machine variantsCreating scripts to capture and restore user data can be time-consuming In-place UpgradeThis is a newer scenario available for clients running Windows 7/8/8.1. Windows setup does most of the work for you:Save existing user data, settings, applications and driversDeploy original Windows 10 imageRestore everythingThis is a new scenario introduced with Windows 8.1 and Windows 10 and it will be interesting to see how it works in anger. In the Microsoft presentations I’ve seen this is being advertised as the preferred method for upgrading from Windows 7 and 8. I personally prefer a wipe-and-load so that I know everything is clean. Also, new OS deployment is often used as an good opportunity to upgrade major software like Microsoft Office which makes some of the in-place upgrade benefits redundant.One scenario I think may benefit is the ability to get a Windows client from an OEM and easily upgrade it to Windows 10 while keeping all the drivers it has. Getting the driver packages for new machines was a burden for some smaller companies. ProsPreserves all data: user data, setting, applications and drivers and therefore is potentially less riskyDon’t always require new drivers if existing drivers are compatibleOften a shorter deployment timeRequires less preparationConsCannot use a customised image, the original Windows 10 media must be usedIf a machine had obsolete installations and settings these will remain Provisioning This is another new Enterprise-focused scenario designed to help with the situations where a company wants to ship a new Windows 10 machine directly from the OEM to a user and then have enterprise software and policies applied to that machine to bring it into compliance.This is controlled by a provisioning package (.ppkg) that is obtained and executed on the target machine and can perform the following operations:Change Windows 10 version from Pro to Enterprise and add in Enterprise features, updates and language packsRetains drivers and applicationsInstall or remove Modern UI applications Enrol into a domain or management solutionProvisioning packages are created with the new Windows Image and Configuration Designer (Windows ICD) tool. ProsCan change Windows from Pro to Enterprise - this previously required a wipe-and-loadEnables Bring Your Own Device (BYOD) scenariosCons The available policies are a small - but useful - subset of those available in Group PolicyYet another tool to go into the toolkit along with WinPE, WIMs, MDT, ConfigMgr. Many organisations already struggle with the best way to deploy and now we have a choice of bespoke vs MDT vs ConfigMgr vs MDM vs Windows ICDFor remote installations, you need a delivery mechanism and the .ppkg files involved may be largeThe only applications that can be installed are Modern UI applications. PowerShell scripts and Win32 applications are in the long-term plan. Deployment Tools and KitsHere are links to the toolkits you need for MDT and ConfigMgr to deploy Windows 10. Many are in beta or RC stage - I’ll update the links when the final versions are publicly available.MDT 2013 Update 1 Preview (Windows 10 support)ConfigMgr 2012 Service Pack 2 (Windows 10 support. Ignore the evaluation part. This applies for both 2012 and 2012 R2)Windows Assessment and Deployment Kit (Windows ADK) for Windows 8.1 Update (Windows 8.1 WinPE is used in ConfigMgr 2012 for deployment and works fine for Windows 10)Windows Assessment and Deployment Kit (Windows ADK) for Windows 10 Preview (Contains the Windows ICD) VideosHere are a selection of videos from the MS Ignite conference in May 2015 that I found the most useful:What’s new in Windows 10 DeploymentWhat’s new with ConfigMgr OSD and MDTDeploying Windows 10: Back to BasicsUpgrading to Windows 10 in DepthTroubleshooting Windows 10 Deployment: Top 10 Tips and Tricks
  12. I use SetSoundDevice to control my audio devices but the UI was either blurry like this: or unusable like this: so I made this horrible thing to add scaling to the GUI: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Change2CUI=y #AutoIt3Wrapper_Res_HiDpi=y #AutoIt3Wrapper_AU3Check_Parameters=-w 3 -w 4 -w 5 #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/sf /sv /rm #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <File.au3> ;~ _convertGUI("") If $CmdLine[0] <> 0 Then _convertGUI($CmdLine[1]) Func _convertGUI($sFilePath) If $sFilePath <> "" Then Local $aArray = FileReadToArray($sFilePath) Else ;TEST DATA Local $aArray[6] = ['$H_Res_Language = GUICtrlCreateProgress(5, 120, 210 + 25, 480, 20, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE)) ; $CBS_DROPDOWNLIST)', _ 'Local $h_Ok = GUICtrlCreateButton("Ok", 72, 224, 81, 33, 0)', _ 'GUICreate($Warning_TiTle, 700, 310, -1, -1, $WS_SIZEBOX + $WS_SYSMENU + $WS_MINIMIZEBOX)', _ 'GUICtrlCreateLabel("Output type: ", 30, 130, 65, 20) ;, $SS_RIGHT)', _ '$H_FieldNameEdit = GUICtrlCreateEdit($INP_FieldNameEdit, 100,260+25, 500, 150 - 25) ;comment', 'Local $H_CANCEL = GUICtrlCreateGraphic("Cancel", 224, 224, 97, 33, 0)'] EndIf Local $hTimer = TimerInit(), $iGUIElementCount = 0, $sResult = "", $sFileName = "", $sDrive = "", $sDir = "", $sExtension = "" If @Compiled Then _PathSplit($sFilePath, $sDrive, $sDir, $sFileName, $sExtension) $sFileName = StringRegExpReplace($sFilePath, "^.*\\", "") EndIf For $i = 0 To (UBound($aArray) - 1) If StringRegExp($aArray[$i], "GUICtrlCreate|GUICreate") Then $sResult = _splitComma($aArray[$i]) If Not @error Then $aArray[$i] = $sResult $iGUIElementCount += 1 EndIf Next ConsoleWrite("t = " & TimerDiff($hTimer) & " GUI elements = " & $iGUIElementCount & " lines = " & (UBound($aArray) - 1) & @CRLF) If $sFileName <> "" Then Local $hFile = FileOpen("edited." & $sFileName, 2) _FileWriteFromArray("edited." & $sFileName, $aArray) FileClose($hFile) EndIf Exit EndFunc ;==>_convertGUI Func _splitComma($sString) Local $sSplitResult = "", $sTrimmedR = "", $sTrimmedL = "" Local $aSplit = StringSplit($sString, ',') If Not @error Then $sTrimmedR = "" $sTrimmedL = "" For $j = 1 To $aSplit[0] If StringRegExp($aSplit[1], "(?:.GUICtrlCreateGraphic|GUICtrlCreateProgress|GUICtrlCreateSlider|GUICtrlCreateTab|GUICtrlCreateTreeView)") Then If $j = 1 Then While StringLeft($aSplit[$j], 1) <> '(' $sTrimmedL &= StringLeft($aSplit[$j], 1) $aSplit[$j] = StringTrimLeft($aSplit[$j], 1) WEnd $aSplit[$j] = StringTrimLeft($aSplit[$j], 1) EndIf EndIf If $j = $aSplit[0] Then While StringRight($aSplit[$j], 1) <> ')' $sTrimmedR &= StringRight($aSplit[$j], 1) $aSplit[$j] = StringTrimRight($aSplit[$j], 1) WEnd $aSplit[$j] = StringTrimRight($aSplit[$j], 1) EndIf If StringRegExp($aSplit[$j], "[0-9]") And $aSplit[$j] <> -1 And $aSplit[$j] <> 0 And $aSplit[$j] <> 1 And Not StringInStr($aSplit[$j], ')') Then If StringRegExp($aSplit[$j], "\-|\+") Then ;put parenthesis around + or - $aSplit[$j] = '(' & $aSplit[$j] & ")*$g_DPI" Else $aSplit[$j] = $aSplit[$j] & "*$g_DPI" EndIf EndIf If $j < $aSplit[0] Then $sSplitResult &= $aSplit[$j] & ',' ElseIf $j = $aSplit[0] Then $sSplitResult &= $aSplit[$j] & ')' Else $sSplitResult &= $aSplit[$j] EndIf Next If $sTrimmedR <> "" Then $sSplitResult &= StringReverse($sTrimmedR) If $sTrimmedL <> "" Then $sSplitResult = $sTrimmedL & '(' & $sSplitResult Else SetError(1) Return EndIf ConsoleWrite($sSplitResult & @CRLF) Return $sSplitResult EndFunc ;==>_splitComma And now it looks good: but it doesn't work on everything, for example the "GUICtrlCreateLabel("Output type: ", 30, 130, 65, 20) ;, $SS_RIGHT)" (from the autoit3wrapper gui) because the comment contains a parenthesis and it would break completely if there were variables as parameters.. Is there some kind of parser around that I could use instead or maybe someone who has already done something like this?
  13. Hello!!! In the past I had problems adding an application as a default for an extension in Windows 10. (It was easy in windows 7 using Registry) But since Windows 8 It requires to do some steps more. I wrote a tool (in other programming language) months ago for handling it. But now I just want to share an AutoIt version. Check on GitHub. Saludos
  14. Dan - thanks for all that you do - this stuff is great. Hoping you can assist with an issue we are having now that we have moved to Windows 10/Server 2016. The Chrome interactions were working flawlessly until moving over. Now my code fails when attempting to create the session. As you can see, our Chrome install is not in a standard location but I have validated the path to the binary. I have attached some detail below including system info, console output and the chrome log detail. I have tried several recommendations that have seen in various forums but none have made a difference Any assistance you can give would be greatly appreciated. Thanks in advance, chrome_Details.txt
  15. Version 5.1

    8,862 downloads

    Features: Create modern looking borderless and resizable GUIs with control buttons (Close,Maximize/Restore,Minimize, Fullscreen, Menu) True borderless, resizeable GUI with full support for aerosnap etc. Many color schemes/themes included. See MetroThemes.au3 for more details. 2 type of Windows 8/10 style buttons. Modern checkboxes, radios, toggles and progressbar. All buttons, checkboxes etc. have hover effects! Windows 10 style modern MsgBox. Windows 10/Android style menu that slides in from left.
  16. Hi All, Please help me on how to fetch date/time of last windows 10 system restore point using autoit? Basically its about querying the last restore point.
  17. Hi So I am trying to click the green button, this button is not always in the same place. So fare I am trying to click it by finding the color but there is also something else with the same color on the screen (circled in yellow) that is causing issues. Is there a way to use the Title and Class of the window (can't be just the window as there are more than one with the same name). How does AutoIt Info get this information?
  18. Hi guys AutoIt content - Microsoft thinks any AutoIt content is unwanted. What it does is simply delete any EXEs. No option of do you want to continue... The March 2020 updated has substantially changed the Defender Virus Protection logic and layout. I found three pages relevant to the help, and lots of outdated content. Is there a quick and easy way to set folder exclusions? Any help is appreciated and simply using google is not good enough, as this is a new problem, caused by the update. Any ideas please? ____________________________ ANSWER Found it. Accessing the menu through the Control Panel does not work Click the Defender shield in the icon tray. Scroll down to Virus & threat protection settings click Manage Settings Scroll down to Exclusions click Add or remove exclusions then click the + for Add an exclusion, and select File / Folder / File type / Process Select Folder and browse to select. 😥 Skysnake
  19. Hi all, I'm trying to automate the install of a specific networking device. All goes well, I can install the driver on both Windows 7 & 10, rescan for hardware, set the IP-settings and all, but there's one issue. In Windows 10, I can disable all connection protocols using Powershell, but Windows 7 does not offer this Powershell-Cmdlet. So I programmed a way (two years ago) to let AutoIt open the network-adapter properties and then deselect all checkboxes except for the TCP/IP-V4. I recovered this snippet somewhere in my old files and tried to reintegrate this into my latest script, but it doesn't seem to work. On Windows 10 I get a blank screen for a few seconds and that's it, on Windows 7 it makes explorer crash. I think it's quite safe to test this on your own system as long as you're not using IPv6 to connect to the internet and as long as you return to check all the boxes again (so you don't break your connectivity). If anyone has any idea, I'd be glad to hear from you! Thanks in advance and stay safe in these Corona-ridden times 🙂 Kind regards, Jan There are three functions involved: DisableAllProtocols($AdapterName) This one is the main function that 'should' uncheck all the checkboxes in the adapter's Properties-window. Func DisableAllProtocols($AdapterName) OpenNetConnToAdapter($AdapterName) ;Find the IDs of all relevant controls Local $Handle_Window_Properties = WinWaitActive($Adaptername & " Properties","") Local $Handle_Listview_Protocols = ControlGetHandle($Adaptername & " Properties","","[CLASSNN:SysListView321]") Local $Handle_OK_Button = ControlGetHandle($Adaptername & " Properties","","[CLASSNN:Button6]") Local $List_CMN_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Client for Microsoft Networks") Local $List_FPSMN_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","File and Printer Sharing for Microsoft Networks") Local $List_QOS_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","QoS Packet Scheduler") Local $List_MNAMP_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Microsoft Network Adapter Multiplexor Protocol") Local $List_MLLDPPD_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Microsoft LLDP Protocol Driver") Local $List_IPV6_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Internet Protocol Version 6 (TCP/IPv6)") Local $List_LLTDR_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Link-Layer Topology Discovery Responder") Local $List_LLTDMIOD_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Link-Layer Topology Discovery Mapper I/O Driver") ; Disable All Protocols Except IPV4 SetCheckboxState($Handle_Listview_Protocols,$List_CMN_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_FPSMN_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_QOS_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_MNAMP_ID,3) SetCheckBoxState($Handle_Listview_Protocols,$List_MLLDPPD_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_IPV6_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_LLTDR_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_LLTDMIOD_ID,3) ;Click OK ControlClick($Handle_Window_Properties,"","Button6") Sleep(50) WinClose("Network Connections") EndFunc OpenNetConnToAdapter($AdapterName) This function opens the network adapter's Properties-page Func OpenNetConnToAdapter($AdapterName) ShellExecute("control.exe","ncpa.cpl",@WindowsDir,"",@SW_SHOW) WinWait("Network Connections","") WinActivate("Network Connections","") Local $Handle_Window_NetworkConnections = WinWaitActive("Network Connections","") Send("{F5}") Sleep(250) Local $AdapterNameArray = StringSplit($AdapterName,"") For $i = 1 To $AdapterNameArray[0] Step 1 Send($AdapterNameArray[$i]) Sleep(10) Next Sleep(50) Send("{APPSKEY}") Sleep(50) Send("{R}") Sleep(500) Return EndFunc SetCheckboxState($Handle,$checkbox_id,$wantedstate) This function changes the state of a checkbox Func SetCheckboxState($handle,$checkbox_id,$wantedstate) ;$handle : SysListView32-handle ;$checkbox_id : The ID of the checkbox you want to control ;$wantedstate : The wanted status (2 for checked, 3 for unchecked) Local $currentstate = _GUICtrlListView_GetItemStateImage($handle,$checkbox_id) If $currentstate = $wantedstate Then Return Else _GUICtrlListView_SetItemSelected($handle,$checkbox_id,True,True) Send("{Space}") Sleep(50) Return EndIf EndFunc
  20. I have a strange behavior in an Autoit program. The program works perfectly in the original environment I created the program for - for Windows 7 and Office 2010. My workplace is migrating to Windows 10 with Office 2016. When I run this program in that new environment, the code actually executes without any errors, however, the excel process which was opened to read a spreadsheet/workbook does not close while the program is running. If you exit the program, the excel process ends at that point... I could ignore this behavior - one little excel process hanging out there is not going to kill anything, however - it just bugs me ! While troubleshooting the issue, I placed a number of error checks after the excel close - and the close actually reports that it is successful. I tried a few varieties of closing the excel process, and none of the methods tried seemed to actually work as well at the one in my code - the only downside being that it has to wait until the program finishes to actually close. Any ideas on why an excel close would hang until program exit ? Local $oExcel = _Excel_Open(False, False, False, False, True) If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF", "Error creating the Excel application object." & @CRLF & "@error = " & @error & ", @extended = " & @extended) Local $oWorkbook = _Excel_BookOpen($oExcel, $sUserRoleMenuXLS, False, true ) If @error Then     MsgBox($MB_SYSTEMMODAL, "Excel UDF", "Error opening workbook '" & $sUserRoleMenuXLS & @CRLF & "@error = " & @error & ", @extended = " & @extended)     _Excel_Close($oExcel, False, False)  Exit EndIf ;  this section will find the user id in the first 3 columns of the user/menu spreadsheet, and if it finds it - returns the value stored in the cell 2 locations to the right... With $oExcel.ActiveSheet.Range("A:C").Find (@UserName)     $Match = .Find (@UserName)     If (Not IsObj($Match)) or (stringlen($Match.Offset(0, 2).value) = 0)    Then         MsgBox($MB_SYSTEMMODAL, 'UIPLauncher Error', 'No Menu assigned for user - Contact Support.') ; Display a warning if the script isn't compiled or the file doesn't exist.         ;_Excel_BookClose($oWorkbook, False)         _Excel_Close($oExcel, false, false)         Exit     Else         Local  $cResult = $Match.Offset(0, 2).value     EndIf EndWith $oWorkbook.Saved = True _Excel_BookClose($oWorkbook, False) _Excel_Close($oExcel, false, false) ;close does not seem to work on windows 10 and office 2016
  21. My AutoIt script works fine, for the most part, however, if it goes idle for roughly 30 minutes, it will won't be able to send data to a 3rd party application window titled, "Case #". The problem lies within the function "SendFusion", it's able to see the handle for the "WinActivate" and "WinWaitActivate" (I've also tried putting in 10 seconds in the WinWaitActivate as well, doesn't work). However, if we have been idle, it will always fail to send data afterward. On what I've tried so far: "Send" function with the data and a {ENTER} i.e. Send($CaseTxt & "{ENTER}"), this won't even hit the enter key ControlSetText, tried passing the handle from WinActivate, using the title "Case #" that was copied directly from the Autoit Window Info, hard coding the title, Using CLASS:WindowsForms10... always returns a 0 ControlCommand (same as above) always returns a 0 ControlGetFocus always returns a 0 ControlFocus, always returns a 0 Creating a new and simple Au3 script that just sends data to "Case #", also fails NOTE: If I close the Au3 script and just scan the data directly into the "Case #" or even type it, it works fine with no issues. I'm confused as to why it would not work after a long idle period? Below are the essential parts of the script, I can provide the entire thing if needed. Any suggestions would be greatly appreciated! #include <AutoItConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <Process.au3> #include <Misc.au3> #include <IE.au3> ;--------------------------------------------------------------- ; Only one instance can run ;--------------------------------------------------------------- If _Singleton("gross.exe", 1) = 0 Then MsgBox($MB_SYSTEMMODAL, "Warning", "Gross.exe is already running. Please exit the existing version first (check the icons in the lower right corner of your screen) before running it again.") Exit EndIf ;--------------------------------------------------------------- ; AutoIt Options ;--------------------------------------------------------------- Opt("GUIOnEventMode", 1) ; Change to OnEvent mode Opt("WinWaitDelay", 0) ; Alters how long a script should briefly pause after a successful window-related operation. Time in milliseconds to pause (default=250). Opt("WinTextMatchMode", 1) ; Alters the method that is used to match window text during search operations. 2 = Quick mode Opt("SendKeyDelay", 0) ; Alters the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely. Time in milliseconds to pause (default=5). if ($fusionWindowTitle="NONE" or $fusionCaseNumWinTitle="NONE" or $appWindowTitle="NONE" or $winActivateTimeout="NONE" or $winCloseTimeout="NONE" or $winWaitTimeout="NONE" or $pdfViewerWidth="NONE" or $pdfViewerHeight="NONE" or $pdfViewerLeft="NONE" or $pdfViewerWindowName="NONE" or $pdfViewerExeName="NONE" or $pdfUrl="NONE" or $pdfDownloadCommand="NONE") Then Msgbox(0,"ERROR", "gross.ini is missing or does not contain all settings. Please contact Help Desk with this information") Exit -1 EndIf ;--------------------------------------------------------------- ; application settings/constants ;--------------------------------------------------------------- Global Const $[VARIABLE] = IniRead("gross.ini", "default", "[TitleOfVariable]", "NONE") Global Const $[VARIABLE] = IniRead("gross.ini", "default", "[TitleOfVariable]", "NONE") Global Const $[VARIABLE] = IniRead("gross.ini", "default", "[TitleOfVariable]", "NONE") Global Const $[VARIABLE] = IniRead("gross.ini", "default", "[TitleOfVariable]", "NONE") ;--------------------------------------------------------------- ; create the main window ;--------------------------------------------------------------- Local $mainWindow = GUICreate($appWindowTitle, 380, 190) ; create the main GUI window GUISetOnEvent($GUI_EVENT_CLOSE, "handleCloseClick") ; when the click the windows close button call handleCloseClick() WinSetOnTop($appWindowTitle, '', 1) ; Sets main GUI always on top ;--------------------------------------------------------------- ; create the controls on the main window ;--------------------------------------------------------------- Local $okButton = GUICtrlCreateButton("OK", 160, 160, 54,24) ; create OK button GUICtrlSetOnEvent($okButton, "validateInput") ; when they click ok, call handleInputProcessRequest() GUICtrlCreateLabel("Scan Input", 10, 10) ; create a label Global $inputScan = GUICtrlCreateInput("", 10,134,358) ; create the input scan box GUICtrlSetOnEvent($inputScan, "validateInput") ; when they press enter in the scan input box, call handleInputProcessRequest() GUICtrlSetState($inputScan,$GUI_FOCUS) ; automatically sets focus on the input field GUISetState(@SW_SHOW) ; main GUI loop that runs at all times ;--------------------------------------------------------------- While 1 ;---------------------------------------------------------- ; If sumatraPDF active, resets focus back to GUI ;---------------------------------------------------------- If WinActive($pdfViewerWindowName) Then consoleWrite('While Loop sumatraPDF was active' & @CRLF) setMainWindow() ;---------------------------------------------------------- ; After data sent to ProTracker, check for mismatch ; save button to trigger the event handler when clicked ;---------------------------------------------------------- ElseIf WinActive($proTrackerWindowTitle) Then $ie = _IEAttach("ProTracker") $mismatchButton = _IEGetObjByName($ie, $proTrackerMisMatchButtonId) $oEvent = ObjEvent($mismatchButton, "mismatchButton_") If @error Then setMainWindow() ;--------------------------------------------------------------------- ; If Fusion is prompting for the case #, focus back to main GUI input ; If second GUI 'Unknown' detect do nothing ;--------------------------------------------------------------------- ElseIf WinExists($fusionWindowTitle) and WinExists($fusionCaseNumWinTitle) and Not WinActive($mainWindow) and Not WinExists('Unknown Input') Then setMainWindow() EndIF ;--------------------------------------------------------------------- ; Checks if $processFlag = Done, if so, shows PDF viewer and clears ; processFlag for next iteration ;--------------------------------------------------------------------- IF WinExists($pdfViewerWindowName) and $processFlag == 'Done' Then WinSetState ($pdfViewerWindowName, '', @SW_SHOW) $processFlag = '' setMainWindow() EndIF Sleep(100) ; Sleep to reduce CPU usage WEnd Func handleInputProcessRequest($input) $processFlag = True Local $hTimer = TimerInit() consoleWrite('> handleInputProcessRequest: ' & @CRLF) Local $idInput = identifyInput($input) ; Select a proccess to run based on id input Select Case $idInput = "container" ; regex that captures only the case number $caseTxt = StringUpper(StringRegExpReplace($strippedInputData, '\??(\w*\d*-\d*|\d*).*$','$1')) If WinExists($fusionWindowTitle) and WinExists($fusionCaseNumWinTitle) Then sendProTracker(StringUpper($strippedInputData)) sendFusion($caseTxt) ; gets pdf for sumatraPDF in seperate script, since that function is the slowest Run("viewPDF.exe " & $caseTxt) ;getSumatraPDF($caseTxt) $lastCaseNum = $caseTxt Else ; Checks to make sure the previous "Container" case num is the same ; to the current Container case num, before sending to ProTracker If($lastCaseNum <> $caseTxt) Then ; If not the same case number send alert sound SoundPlay("error.wav") Else sendProTracker($strippedInputData) EndIf EndIf Case $idInput = "user" sendProTracker($strippedInputData) Case $idInput = "cassette" sendProTracker(StringUpper($strippedInputData)) Case $idInput = "unknown" selectUnknown() EndSelect Local $fDiff = TimerDiff($hTimer) $processFlag = 'Done' consoleWrite('> handleInputProcessRequest Completed Total time: ' & $fDiff & ' ' &@CRLF&@CRLF&@CRLF) EndFunc Func sendFusion($caseTxt)     Local $hTimer = TimerInit()     consoleWrite('+ sendFusion initiated: ' & $caseTxt & @CRLF)     If $caseTxt = "" Then         MsgBox(0, "Error", "Not a valid case number")     Else         ;$fusionCaseNumWinTitle = "Case #"         $retVal1 = WinActivate($fusionCaseNumWinTitle, "")         consoleWrite("ReturnValue WinActivate " & $retVal1 & @CRLF)         $retVal2 = WinWaitActive($fusionCaseNumWinTitle,"",$winActivateTimeout)         consoleWrite("ReturnValue WinWaitActive: " & $retVal2 & @CRLF)         $retVal3 = ControlSetText($fusionCaseNumWinTitle, "", "", $caseTxt)         ;$retVal3 = ControlCommand($fusionCaseNumWinTitle, "", "", "EditPaste", $caseTxt)         consoleWrite("ReturnValue ControlSetText: " & $retVal3 & @CRLF)         ;Send($caseTxt & "{ENTER}")         WinWaitClose($fusionCaseNumWinTitle, "", $winCloseTimeout)         consoleWrite('+ sendFusion WinWaitClose: ' & @CRLF)     EndIf     Local $fDiff = TimerDiff($hTimer)     ConsoleWrite('+ sendFusion Completed Total time:' & $fDiff & ' ' & @CRLF) EndFunc Console logs from the SciTLE Window (x86) Info matches the correct handle for the WinActivate and WinWaitActivate Window Control (x86) Info, I've tried the CLASS, the ID, also I just noticed that the "handle" in "Control" and "Window" appear to be different as well. So far the only work-around is to close down the 3rd party application and the AutoIt script, re-open them and it works all completely fine. But this is a pain for the end-user since it's all touch screen and it slows down their workflow, which they can be extremely sensitive about.
  22. As the title says, does anyone know of a way to open the Windows 10 action center using AutoIt. Maybe via rundll or some other applet? My intention is to just hide the normal icon, then have an AutoIt system tray icon that will open the action center on click. And I can't just send the Win+A hotkey because I have it disabled. Thanks for reading.
  23. Hello All, If you're interested in the story, read below. Otherwise, just jump to the end of the post. Story: Sometimes my computer goes crazy with Windows update. I tried to turn it off with "services.msc", but couldn't close the it. So, I did some research online that it's triggered by Update Orchestration and Task Scheduler and Windows Update. I also checked that all three processes are triggered by svchost.exe. So, I tried to make a script to close this process. I found some useful functions ProcessList and _ProcessGetName using the help documents and coded something as below: #include <MsgBoxConstants.au3> #include <Process.au3> Local $aProcessList = ProcessList() For $i = 1 To $aProcessList[0][0] $iPid = $aProcessList[$i][1] $sName = _ProcessGetName($iPid) MsgBox($MB_SYSTEMMODAL, "The process", "PID: " & $iPid & @CRLF & "NAME: " & $sName) If $sName = "svchost.exe" Then ;ProcessClose($iPid) ;I don't know if this is the process I want to close EndIf Next But the problem is; there are so many svchost.exe exists in the process list. I can't close all of them, some of them are essential to run Windows (well, accidentally I terminated some of them and ended up with a blue screen --------------- Well, how can I know the process name like "Service Host: Update Orchestration" (not the scvhost)? It's not only with the .exe file, just to the name shown in Windows.
  24. I have this AutoIt script that works on Windows 7. However, when I test it on Windows 10, the objEvent will not execute the function it's supposed to call. So I have a webpage the script will check if it is active, then it will search if a popup button exist (elementId), if so, assign it to the event handler so that when that button is clicked, then handler function will move the focus back to the main GUI again. If WinActive("Website Title - Internet Explorer") Then    $ie = _IEAttach("Website Title")    $objElement= _IEGetObjById ($ie, "elementId")    local $oEvent = ObjEvent($objElement, "_MY_EVENT_HANDLER_") EndIf Func _MY_EVENT_HANDLER_onclick($oEvtObj)     msgbox(0,"Alert Window", "Button Clicked!") setMainWindow() ; sets focus back to main GUI EndFunc I've verified, on Windows 10, that it does see the object element. But it will not trigger the event. Could it be related to some timing issues due to Windows 10 Internet Explorer over Windows 7 Internet Explorer? Windows 7 IE version 11.0.9600.19507 Windows 10 IE version 11.418.18362.0 AutoIt v 3.3
  25. My company is moving from WIN7 to WIN10, I have had a script that runs in the middle of the night, when the computer is locked, to open an Excel spreadsheet, read a few cells, and generate an email. This has worked fine under WIN7, when I try to run under WIN10 it freezes when it gets to a line to handle an array. When I run without the computer locked the script runs as expected. After doing a lot of investigating, it looks like the following line reads a "0" from the Excel file instead of a text string, only when the computer is locked. Any ideas? $Driver1 = _Excel_RangeRead($oWorkbook, "Template", "H12") This is how I am opening the Excel file: Local $oExcel = _Excel_Open(False) Sleep(10000) $oWorkbook = _Excel_BookOpen($oExcel, $sFilePath, True, False)
×
×
  • Create New...