Jump to content
WilliamasKumeliukas

[Looking for Collaboration] Windows 10 Configurator

Recommended Posts

Hi,

I started this project alone in May 2020 as project in my spare time at work, I'm working for a IT compagny that's started opening their services to residential customers few months ago and now my position in the company kinda drifted in the doom and gloom world of repetitive tasks like: Reinstallation 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 responsability 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) (Tested & Working - AutoIT only)

  • Download & Install up to 567 softwares with Auto prediction of text typed  (Tested & Working - using 3rd party tool)

  • Change OEM Information (Tested & Working - contains both AutoIT version and CMD script)

  • Disable ScreenSaver (Require testing AutoIT only)

  • Change Computer Name (Require testing AutoIT only) 

  • Show Computer Information and Smart status on GUI (Work - AutoIT Only)

  • Change .pdf / .pdfxml from Edge to Adobe Reader DC (Work - using 3rd party tool)

  • Change Edge to Google Chrome as Default Browser (Tested & Working - using 3rd party tool)

  • Windows Updates (Working - AutoIT only)

  • Install Office 

  • Verify and Update softwares installed (Can be added if wanted (up to 567 softwares) - 3rd party tool)

  • Activate Office (Tested on 2010 & Working - CMD Script)

  • Pin to taskbar Excel, Outlook, Word, Chrome (Tested & Working - using 3rd party tool)

  • GUI currently featuring the following options :

  1. - Checkboxes for desired tasks

  2. Inputs for : SupportUrl, Manufacturer, Model, SupportPhone, SupportHour, OEM Logo path

  3.  Redirect ConsoleWrite with timestamped messages in richedit (errors shown separately in red text)

           *** To Do ***

  1.  - Read informations needed for tasks like: OEM, ComputerName, NAS user/password etc... from a file

  2.  - ListView for Windows Updates

  3.  - Probably more

 

***  If this project interest you, Reply here This will greatly help me to see if you'd like this project to become real :) ***

______________________________________________________________________________________________________________________________

2020.09.21 Update: Since this topic reached over 200+ views without a single interest shown by community, pm me if you're willing to be part of the project and i'll share with you the GitHub project link :) 

Best Regards,

~WilliamasKumeliukas

Edited by WilliamasKumeliukas

Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites

Main post updated

- Few more tasks added to the progression list + more colors added in hope this make it more pleasant to read :) 

-FAQ answer of #1 improved

Best regards,

~WilliamasKumeliukas

Edited by WilliamasKumeliukas

Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites

The current state is very temporary as everything was tested in separate files therefore I have to put everything together.

Expect to find some parts that aren't yet implemented in the script and there will be some missing functions and unused variables for now.

giphy.gif

I've created a repository for this project on Github and uploaded project folder containing ressources the script require to achieve some of the tasks.

Project link is now available in first post at bottom 

Edit: As my depression and the silence of this topic is growing, unfortunately project will only be shared via PM, if someone is interested to help/participate/contribute on the project.

Regards,

~WilliamasKumeliukas

Edited by WilliamasKumeliukas

Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites

Update 2020.11.18:  First post is updated with new features added in project, here is some screenshot of the project :) 

Stay Tuned! 

Main Tab:

image.thumb.png.9e326a7e828f15e377c6696ca156cb33.png

Windows Updater Tab:

image.thumb.png.df3545b9dd3a67dc769ad80f4d9c9c64.png

OEM and Computer Name configuration Tab :

image.thumb.png.ddea38460e803210ec7a43bec0def294.png

 

 *** If you like the progression and you'd like to help, please pm me and I will add you as contributor in the project GitHub :) ***

~WilliamasKumeliukas 

Edited by WilliamasKumeliukas

Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites

So where is the github project ?


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest beginning - communication with GitHub REST API Forum Rules *
Include Dependency Tree (Tool for analyzing script relations)
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) *

PDF Related:https://www.autoitscript.com/forum/topic/177368-how-to-get-reference-to-pdf-object-embeded-in-ie/ *

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2020-11-20

Share this post


Link to post
Share on other sites

 

To avoid further confusion: GitHub project link is only given if you want to contribute therefore if you're willing to lend a helping hand of any kind in the project, please pm me and ask me ( example: «I'd like to help in the project, can I join in?» ) and I will send you the GitHub project link :) 

(It was mentioned in first post at bottom)

Sincerely,

~WilliamasKumeliukas

Edited by WilliamasKumeliukas
Clarifying a bit more

Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By abberration
      Software Installer
      version 1.1 - 11/6/2020
      This new version (first in 8 years) is a total rewrite of the original. I was not getting notifications on this thread and missed people's questions and requests. I have incorporated some recent requests and will go back further in the posts and consider more upgrades.
      The overall look remains the same, but this version brings many changes. The only script breaking change is your old INI file is not compatible with this version. Some new features:
      When you add software to the Software folder (you need to create this folder in the same directory as your script), you will get prompted to configure the software. If you say yes, it will bring up a form where you can type up a display name for the software (instead of the installer name. Ex: 7z1900-x64.msi can be displayed as 7-Zip), the switch to use, software description and what category tab you want it to appear in. This feature creates and updates an INI file for you, so you don't have to do it manually. While configuring your software, there is a drop-down menu with installer types (Inno, NSIS, MSI, Installshield, Wise, etc). If you know the installer type, it narrows down the switches in the Switch drop-down menu to only show switches for that installer type. If none of the switches are what you need (ex: Firefox uses -ms), just manually type the needed switch in the Switch drop-down menu. By default, only unconfigured software shows up in the Configure Software menu. There is a checkbox to show all software, where you can double-click the software and modify it's data. There is an option to edit the order in which the software is installed. If selected, a form will pop up after you press the Install Selected Software button and before the installation begins. On this form, you can select software installers and move them up and down in the list. I will watch this thread more closely and continue to work on this project. This was one of my first "big" projects and one of my favorites. I'm surprised I haven't revisited sooner.
      Enjoy!
      #include <Array.au3> #include <File.au3> #include <GDIPlus.au3> #include <GUIConstants.au3> #include <GuiTab.au3> #include <GuiListView.au3> #include <GuiMenu.au3> #include <ProgressConstants.au3> Global $fIniConfig = @ScriptDir & "\Config.ini" Global $sSWDir = @ScriptDir & "\Software\" Global $sVersion = "1.1" ; Main GUI $Form1 = GUICreate("Software Installer", 633, 451) $Tab1 = GUICtrlCreateTab(16, 8, 601, 377) $TabSheet1 = GUICtrlCreateTabItem("Audio/Video/Photo") $ListView1 = GUICtrlCreateListView("Software Name|Description", 24, 40, 582, 334) _GUICtrlListView_SetExtendedListViewStyle($ListView1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES)) GUICtrlSendMsg(-1, 0x101E, 0, 200) GUICtrlSendMsg(-1, 0x101E, 1, 375) $TabSheet2 = GUICtrlCreateTabItem("System Tools") $ListView2 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334) _GUICtrlListView_SetExtendedListViewStyle($ListView2, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES)) GUICtrlSendMsg(-1, 0x101E, 0, 200) GUICtrlSendMsg(-1, 0x101E, 1, 375) $TabSheet3 = GUICtrlCreateTabItem("Internet") $ListView3 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334) _GUICtrlListView_SetExtendedListViewStyle($ListView3, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES)) GUICtrlSendMsg(-1, 0x101E, 0, 200) GUICtrlSendMsg(-1, 0x101E, 1, 375) $TabSheet4 = GUICtrlCreateTabItem("Games") $ListView4 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334) _GUICtrlListView_SetExtendedListViewStyle($ListView4, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES)) GUICtrlSendMsg(-1, 0x101E, 0, 200) GUICtrlSendMsg(-1, 0x101E, 1, 375) $TabSheet5 = GUICtrlCreateTabItem("Miscellaneous") $ListView5 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334) _GUICtrlListView_SetExtendedListViewStyle($ListView5, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES)) GUICtrlSendMsg(-1, 0x101E, 0, 200) GUICtrlSendMsg(-1, 0x101E, 1, 375) $TabSheet6 = GUICtrlCreateTabItem("Patches/Updates") $ListView6 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334) _GUICtrlListView_SetExtendedListViewStyle($ListView6, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES)) GUICtrlSendMsg(-1, 0x101E, 0, 200) GUICtrlSendMsg(-1, 0x101E, 1, 375) $TabSheet7 = GUICtrlCreateTabItem("Productivity") $ListView7 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334) _GUICtrlListView_SetExtendedListViewStyle($ListView7, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES)) GUICtrlSendMsg(-1, 0x101E, 0, 200) GUICtrlSendMsg(-1, 0x101E, 1, 375) GUICtrlCreateTabItem("") ; This ends the tab item creation $g1Checkbox1 = GUICtrlCreateCheckbox("Prompt to edit software installation order", 16, 400, 220, 17) ;~ GUICtrlSetState(-1, $GUI_CHECKED) ; Enable this if you want. $g1Button1 = GUICtrlCreateButton("Install Selected Software", 398, 395, 219, 25, 0) $MenuItem1 = GUICtrlCreateMenu("File") $MenuItem1a = GUICtrlCreateMenuItem("Select All", $MenuItem1) $MenuItem2 = GUICtrlCreateMenuItem("Unselect All", $MenuItem1) $MenuItem3 = GUICtrlCreateMenuItem("Exit", $MenuItem1) $MenuItem4 = GUICtrlCreateMenu("Settings") $MenuItem5 = GUICtrlCreateMenuItem("Edit Software Configuration", $MenuItem4) $MenuItem6 = GUICtrlCreateMenu("Help") $MenuItem7 = GUICtrlCreateMenuItem("Help Topics", $MenuItem6) $MenuItem8 = GUICtrlCreateMenuItem("About", $MenuItem6) GUISetState(@SW_SHOW) $aSoftwareList = _FileListToArrayRec(@ScriptDir & "\Software", "*.exe;*.msi", 1) ; List all software in Software folder. If NOT IsArray ($aSoftwareList) Then ; Easy fix for program crashing if no software is in the Software folder. MsgBox(262144, "Error", "No software installers found in the Software folder." & @CRLF & "This program cannot function without any software installers." & @CRLF & "Add some to the folder and restart the program.") Exit EndIf For $i = 1 To 5 ; Add columns for other data. _ArrayColInsert($aSoftwareList, 1) Next Global $aUnconfiguredSW[$aSoftwareList[0][0]+1][5] $aUnconfiguredSW[0][0] = 0 _CheckForNewSoftware($aSoftwareList) If $aUnconfiguredSW[0][0] > 0 Then ; Get a list of all software that has not been configured. $iQueryUser = _QueryUser() If $iQueryUser = 1 Then _SWConfiguration() EndIf EndIf _Populate() ; Loads the software in the Software folder into the various lists. While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $g1Button1 _InstallSelectedSoftware() Case $MenuItem1a _SelectAll(True) Case $MenuItem2 _SelectAll(False) Case $MenuItem3 Exit Case $MenuItem5 _SWConfiguration() Case $MenuItem7 _HelpTopics() Case $MenuItem8 _About() EndSwitch WEnd Func _Populate() ; Find all files in the Software folder and populate the tabs with the installers. For $i = 1 To 7 ; Fill out the master array with data _GUICtrlListView_DeleteAllItems(Eval("ListView" & $i)) Next For $i = 1 To $aSoftwareList[0][0] $sDisplayName = IniRead($fIniConfig, $aSoftwareList[$i][0], "DisplayName", $aSoftwareList[$i][0]) $sCategory = IniRead($fIniConfig, $aSoftwareList[$i][0], "Category", "") If $sCategory = "" Then $sCategory = 5 EndIf $sDescription = IniRead($fIniConfig, $aSoftwareList[$i][0], "Description", "") $checked = IniRead($fIniConfig,$aSoftwareList[$i][0],"IsDefault", "") $aSoftwareList[$i][1] = $sDisplayName $aSoftwareList[$i][2] = $sCategory $aSoftwareList[$i][3] = $sDescription $aSoftwareList[$i][4] = $checked Next For $i = 1 To $aSoftwareList[0][0] ; Populate the tabs with items $iCategory = IniRead($fIniConfig, $aSoftwareList[$i][0], "Category", 5) GUICtrlCreateListViewItem($aSoftwareList[$i][1] & "|" & $aSoftwareList[$i][3], (Eval("ListView" & $iCategory))) If $aSoftwareList[$i][4] = 1 Then $iI = _GUICtrlListView_FindText((Eval("ListView" & $iCategory)), $aSoftwareList[$i][1]) _GUICtrlListView_SetItemChecked((Eval("ListView" & $iCategory)), $iI, True) ;Set checked radiobox of last found control EndIf Next EndFunc ;==>_Populate Func _InstallSelectedSoftware() GUISetState(@SW_DISABLE, $Form1) Local $sExit = "" $Form4 = GUICreate("Installing Software", 443, 172) $g4Label1 = GUICtrlCreateLabel("Installing:", 16, 16, 148, 17) $g4Label2 = GUICtrlCreateLabel("", 16, 40, 418, 19) GUICtrlSetFont(-1, 10, 400, 0, "Arial Rounded MT Bold") GUICtrlSetColor(-1, 0x008080) $g4Label3 = GUICtrlCreateLabel("File Size:", 16, 64, 146, 17) $g4Label4 = GUICtrlCreateLabel("Total Progress:", 16, 112, 75, 17) $g4Progress1 = GUICtrlCreateProgress(16, 136, 414, 17) Local $aInstallList[$aSoftwareList[0][0] + 1][4] $iInstallListSize = 0 For $i = 1 To 7 $iItemCount = _GUICtrlListView_GetItemCount(Eval("ListView" & $i)) For $j = 1 To $iItemCount $vItemChecked = _GUICtrlListView_GetItemChecked(Eval("ListView" & $i), $j - 1) If $vItemChecked = TRUE Then $iInstallListSize += 1 $aInstallList[0][0] = $iInstallListSize $sItemName = _GUICtrlListView_GetItemText(Eval("ListView" & $i), $j - 1) $iArrayPos = _ArraySearch($aSoftwareList, $sItemName, Default, Default, Default, Default, Default, 1) $sSWInstaller = $aSoftwareList[$iArrayPos][0] $sSwitch = IniRead($fIniConfig, $sSWInstaller, "Switch", "") $aInstallList[$iInstallListSize][0] = $sSWDir & $sSWInstaller $aInstallList[$iInstallListSize][1] = $sSwitch $aInstallList[$iInstallListSize][2] = $sItemName $aInstallList[$iInstallListSize][3] = $sSWInstaller EndIf Next Next ReDim $aInstallList[$aInstallList[0][0] + 1][4] $iInstallOrder = GUICtrlRead($g1Checkbox1) If $iInstallOrder = 1 Then ; If the user wants to alter installation order, this pulls up the Gui. $aInstallList = _InstallOrder($aInstallList) EndIf GUISetState(@SW_SHOW, $Form4) ; The Installing Software screen has been hidden until now. For $i = 1 To $aInstallList[0][0] ; Set info into Gui and install the software. If FileExists($aInstallList[$i][0]) Then GUICtrlSetData($g4Label1, "Installing: " & $i & " of " & $aInstallList[0][0]) GUICtrlSetData($g4Label2, $aInstallList[$i][2]) ; Name of software GUICtrlSetData($g4Label3, "File Size: " & Round(FileGetSize($aInstallList[$i][0])/1024000, 1) & " MB") If StringRight($aInstallList[$i][0], 4) = ".msi" Then $sInstallString = '"' & $aInstallList[$i][0] & '" ' & $aInstallList[$i][1] Run("msiexec /i " & $sInstallString) Else RunWait('"' & $aInstallList[$i][0] & '" ' & $aInstallList[$i][1]) EndIf EndIf GUICtrlSetData($g4Progress1, $i/$aInstallList[0][0]*100) Next $sExit = "EXIT" Do Sleep(500) Until $sExit = "EXIT" GUISetState(@SW_ENABLE, $Form1) GUIDelete($Form4) _SelectAll(False) EndFunc Func _SelectAll($TF) ; Sending TRUE or FALSE to select all or unselect all. For $i = 1 To 7 $iItemCount = _GUICtrlListView_GetItemCount(Eval("ListView" & $i)) For $j = 1 To $iItemCount _GUICtrlListView_SetItemChecked(Eval("ListView" & $i), $j - 1, $TF) Next Next EndFunc ;==>_SelectAll Func _HelpTopics() $Form2 = GUICreate("Help", 633, 447) $Label1 = GUICtrlCreateLabel("", 8, 16, 612, 425) GUICtrlSetData(-1, "This program uses silent switches to install software without user interaction. " & _ "To use this functionality, you can edit the Config.ini file to add software and their switches. Example: " & _ @CRLF & @CRLF & "[7z1900-x64.exe] ; <--- This is the actual file name" & _ @CRLF & "Description=YourDescripton" & @CRLF & "Switch=YourSwitcth" & @CRLF & "Category=YourCategory" & @CRLF & "etc... etc..." & _ @CRLF & @CRLF & "Here are some common switches for various installers: (more included in this program's features)" & @CRLF & @CRLF & "/silent used for Inno Setup installers" & @CRLF & _ "/verysilent used for Inno Setup installers" & @CRLF & "/S used for Nullsoft (aka NSIS) installers" & @CRLF & "/s used for Wise installers" & _ @CRLF & "-s used for Ghost installers" & @CRLF & "-ms used for Mozilla installers" & @CRLF & "/quiet used for Microsoft installers" & @CRLF & _ "/qb used for Microsoft installers" & @CRLF & "/qn used for Microsoft installers" & @CRLF & "/passive used for Microsoft installers" & @CRLF & _ "/Q used for Microsoft installers") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete($Form2) ExitLoop EndSwitch WEnd EndFunc ;==>_HelpTopics Func _CheckForNewSoftware($aSoftwareList) Local $aConfigFileSW = IniReadSectionNames($fIniConfig) $iArrayPos = 1 For $i = 1 To $aSoftwareList[0][0] If _ArraySearch($aConfigFileSW, $aSoftwareList[$i][0]) < 1 Then $aUnconfiguredSW[$iArrayPos][0] = $aSoftwareList[$i][0] $aUnconfiguredSW[0][0] = $iArrayPos $iArrayPos += 1 EndIf Next EndFunc Func _SWConfiguration() GUISetState(@SW_DISABLE, $Form1) $Form2 = GUICreate("Configure Software", 620, 470) Global $g2List = GUICtrlCreateList("", 8, 24, 602, 218) $g2Checkbox1 = GUICtrlCreateCheckbox("Show All Software", 8, 240, 121, 17) $g2Label1 = GUICtrlCreateLabel("Display Name For Software:", 8, 264, 250, 17) $g2Input1 = GUICtrlCreateInput("", 8, 280, 250, 21) GUICtrlSetState(-1, $GUI_DISABLE) $g2Label2 = GUICtrlCreateLabel("Installer Type (optional):", 8, 320, 116, 17) $g2Combo1 = GUICtrlCreateCombo("", 8, 336, 250, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetState(-1, $GUI_DISABLE) $g2Label3 = GUICtrlCreateLabel("Silent Switch To Be Used:", 8, 376, 128, 17) $g2Combo2 = GUICtrlCreateCombo("", 8, 392, 250, 25) GUICtrlSetState(-1, $GUI_DISABLE) $g2Label4 = GUICtrlCreateLabel("Software Description (optional):", 300, 264, 250, 17) $g2Input2 = GUICtrlCreateInput("", 300, 280, 250, 21) GUICtrlSetState(-1, $GUI_DISABLE) $g2Label5 = GUICtrlCreateLabel("Category:", 300, 320, 128, 17) $g2Combo3 = GUICtrlCreateCombo("", 300, 336, 250, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetState(-1, $GUI_DISABLE) $g2Label6 = GUICtrlCreateLabel("Double-Click Each Software To Configure. When Finished, Click The Save Button", 8, 6, 391, 17) $g2Label7 = GUICtrlCreateLabel("Editing: ", 8, 240, 602, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x008000) GUICtrlSetBkColor(-1, 0xC0DCC0) GUICtrlSetState(-1, $GUI_HIDE) $g2Checkbox2 = GUICtrlCreateCheckbox("This Software Defaults To Selected (Check Mark On)", 300, 392, 300, 17) GUICtrlSetState(-1, $GUI_DISABLE) $g2Button1 = GUICtrlCreateButton("Edit A Different Software", 300, 430, 160, 25, $WS_GROUP) GUICtrlSetState(-1, $GUI_DISABLE) $g2Button2 = GUICtrlCreateButton("Save Data", 480, 430, 100, 25, $WS_GROUP) GUICtrlSetState(-1, $GUI_DISABLE) GUISetState(@SW_SHOW) _ClearAndSetInputs($g2List, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input1, $g2Input2, $g2Label7, $g2Checkbox1, $g2Checkbox2, $aUnconfiguredSW) Global $idDummy = GUICtrlCreateDummy() GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUISetState(@SW_ENABLE, $Form1) GUIDelete($Form2) _Populate() ExitLoop Case $idDummy _ClearAndSetInputs($g2List, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input1, $g2Input2, $g2Label7, $g2Checkbox1, $g2Checkbox2, $aSoftwareList) GUICtrlSetData($g2Label7, "Editing: " & GUICtrlRead($idDummy)) $sDesc = IniRead($fIniConfig, GUICtrlRead($idDummy), "Description", "") $sFullSwitches = "-s|/silent|/verysilent|/sp- /silent /norestart|/verysilent /norestart|/S|/S /NCRC|/passive|/passive /norestart|/u|/u /z|/q|/q /r:n|/q:a|/qb|/qn|/q:a /r:n|/S|/s" $sSwitch = IniRead($fIniConfig, GUICtrlRead($idDummy), "Switch", $sFullSwitches) Local $aCategories[8] = ["7","Audio/Video/Photo", "System Tools", "Internet", "Games", "Miscellaneous", "Patches/Updates", "Productivity"] $iCategory = IniRead($fIniConfig, GUICtrlRead($idDummy), "Category", "5") $sCategory = $aCategories[$iCategory] $sDisplayName = IniRead($fIniConfig, GUICtrlRead($idDummy), "DisplayName", "") $sIsDefault = IniRead($fIniConfig, GUICtrlRead($idDummy), "IsDefault", "") GUICtrlSetData($g2Input1, $sDisplayName) GUICtrlSetData($g2Combo2, $sSwitch) GUICtrlSetData($g2Input2, $sDesc) GUICtrlSetData($g2Combo3, $sCategory) If $sIsDefault = 1 Then GUICtrlSetState($g2Checkbox2, $GUI_CHECKED) EndIf _EnableDisableControls($g2Input1, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input2, $g2Button1, $g2Button2, $g2Checkbox1, $g2Checkbox2, $g2Label7, $g2List, 1) ; enable Case $g2Button1 GUICtrlSetState($g2Checkbox1, $GUI_UNCHECKED) _ClearAndSetInputs($g2List, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input1, $g2Input2, $g2Label7, $g2Checkbox1, $g2Checkbox2, $aUnconfiguredSW) _EnableDisableControls($g2Input1, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input2, $g2Button1, $g2Button2, $g2Checkbox1, $g2Checkbox2, $g2Label7, $g2List, 0) Case $g2Combo1 _SetSwitchData($g2Combo1, $g2Combo2, $g2Combo3) Case $g2Checkbox1 $iCBRead = GUICtrlRead($g2Checkbox1) If $iCBRead = 1 Then _ClearAndSetInputs($g2List, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input1, $g2Input2, $g2Label7, $g2Checkbox1, $g2Checkbox2, $aSoftwareList) Else _ClearAndSetInputs($g2List, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input1, $g2Input2, $g2Label7, $g2Checkbox1, $g2Checkbox2, $aUnconfiguredSW) EndIf Case $g2Button2 $sCurrentSW = StringTrimLeft(GUICtrlRead($g2Label7), 9) $sDesc = IniWrite($fIniConfig, $sCurrentSW, "Description", GUICtrlRead($g2Input2)) $sSwitch = IniWrite($fIniConfig, $sCurrentSW, "Switch", GUICtrlRead($g2Combo2)) Local $aCategories[8] = ["7","Audio/Video/Photo", "System Tools", "Internet", "Games", "Miscellaneous", "Patches/Updates", "Productivity"] $sCategory = GUICtrlRead($g2Combo3) $iArrayPos = _ArraySearch($aCategories, $sCategory) IniWrite($fIniConfig, $sCurrentSW, "Category", $iArrayPos) $sDisplayName = IniWrite($fIniConfig, $sCurrentSW, "DisplayName", GUICtrlRead($g2Input1)) $sIsDefault = IniWrite($fIniConfig, $sCurrentSW, "IsDefault", GUICtrlRead($g2Checkbox2)) $iArrayPos = _ArraySearch($aUnconfiguredSW, $sCurrentSW) If $iArrayPos > 0 Then _ArrayDelete($aUnconfiguredSW, $iArrayPos) $aUnconfiguredSW[0][0] -= 1 EndIf _ClearAndSetInputs($g2List, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input1, $g2Input2, $g2Label7, $g2Checkbox1, $g2Checkbox2, $aUnconfiguredSW) GUICtrlSetState($g2Checkbox1, $GUI_UNCHECKED) _EnableDisableControls($g2Input1, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input2, $g2Button1, $g2Button2, $g2Checkbox1, $g2Checkbox2, $g2Label7, $g2List, 0) EndSwitch WEnd EndFunc Func _SetSwitchData($g2Combo1, $g2Combo2, $g2Combo3) $sInstaller = GUICtrlRead($g2Combo1) GUICtrlSetData($g2Combo2, "") If $sInstaller = "Ghost Installer" Then GUICtrlSetData($g2Combo2, "-s", "-s") ElseIf $sInstaller = "Inno Setup" Then GUICtrlSetData($g2Combo2, "/silent|/verysilent|/sp- /silent /norestart|/verysilent /norestart", "/silent") ElseIf $sInstaller = "Install Shield" Then GUICtrlSetData($g2Combo2, "/S|/S /NCRC", "/S") ElseIf $sInstaller = "Microsoft Hotfix Package" Then GUICtrlSetData($g2Combo2, "/passive|/passive /norestart|/u|/u /z|/q|/q /r:n|/q:a|/qb|/qn|/q:a /r:n", "/passive /norestart") GUICtrlSetData($g2Combo3, "Patches/Updates") ElseIf $sInstaller = "MSI Package" Then GUICtrlSetData($g2Combo2, "/qb|/qn", "/qb") ElseIf $sInstaller = "Nullsoft (NSIS)" Then GUICtrlSetData($g2Combo2, "/S", "/S") ElseIf $sInstaller = "Wise Installer" Then GUICtrlSetData($g2Combo2, "/s", "/s") Else GUICtrlSetData($g2Combo2, "-s|/silent|/verysilent|/sp- /silent /norestart|/verysilent /norestart|/S|/S /NCRC|/passive|/passive /norestart|/u|/u /z|/q|/q /r:n|/q:a|/qb|/qn|/q:a /r:n|/S|/s") EndIf EndFunc Func _EnableDisableControls($g2Input1, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input2, $g2Button1, $g2Button2, $g2Checkbox1, $g2Checkbox2, $g2Label7, $g2List, $01) GUICtrlSetState($g2Input1, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE) GUICtrlSetState($g2Combo1, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE) GUICtrlSetState($g2Combo2, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE) GUICtrlSetState($g2Combo3, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE) GUICtrlSetState($g2Input2, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE) GUICtrlSetState($g2Checkbox1, ($01 = 1) ? $GUI_HIDE : $GUI_SHOW) GUICtrlSetState($g2Checkbox2, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE) GUICtrlSetState($g2Button1, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE) GUICtrlSetState($g2Button2, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE) GUICtrlSetState($g2Label7, ($01 = 1) ? $GUI_SHOW : $GUI_HIDE) GUICtrlSetState($g2List, ($01 = 1) ? $GUI_DISABLE : $GUI_ENABLE) EndFunc Func _ClearAndSetInputs($g2List, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input1, $g2Input2, $g2Label7, $g2Checkbox1, $g2Checkbox2, $aSW, $iSWList = 0) GUICtrlSetData($g2List, "") GUICtrlSetData($g2Input1, "") GUICtrlSetData($g2Input2, "") GUICtrlSetData($g2Combo1, "") GUICtrlSetData($g2Combo2, "") GUICtrlSetData($g2Combo3, "") GUICtrlSetData($g2Combo1, "Ghost Installer|Inno Setup|Install Shield|Microsoft Hotfix Package|MSI Package|Nullsoft (NSIS)|Wise Installer") _SetSwitchData($g2Combo1, $g2Combo2, $g2Combo3) GUICtrlSetData($g2Combo3, "Audio/Video/Photo|System Tools|Internet|Games|Miscellaneous|Patches/Updates|Productivity", "Miscellaneous") GUICtrlSetState ($g2Checkbox2, $GUI_UNCHECKED) GUICtrlSetData($g2List, "") $iIsChecked = GUICtrlRead($g2Checkbox1) If IsArray($aSW) Then For $i = 1 To $aSW[0][0] GUICtrlSetData($g2List, $aSW[$i][0]) Next EndIf EndFunc Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) Local $hWndFrom, $iIDFrom, $iCode, $hWndEdit $hWndFrom = $lParam $iIDFrom = _WinAPI_LoWord($wParam) $iCode = _WinAPI_HiWord($wParam) If $iCode = $LBN_DBLCLK AND $iIDFrom = $g2List Then $sClicked = GUICtrlRead($g2List) GUICtrlSendToDummy($idDummy, $sClicked) EndIf EndFunc Func _InstallOrder($aInstallList) GUISetState(@SW_DISABLE, $Form1) $Form5 = GUICreate("Installation Order", 423, 292) $g5Label1 = GUICtrlCreateLabel("Highlight software and click the up and down arrows to change order of installation", 16, 3, 393, 17) $g5List1 = GUICtrlCreateList("", 16, 24, 321, 253, $LBS_NOTIFY) $g5Button1 = GUICtrlCreateButton(ChrW(8593), 344, 112, 35, 25, $WS_GROUP) $g5Button2 = GUICtrlCreateButton(ChrW(8595), 344, 144, 35, 25, $WS_GROUP) $g5Button3 = GUICtrlCreateButton("Done", 351, 251, 59, 25, $WS_GROUP) GUISetState(@SW_SHOW) For $i = 1 To $aInstallList[0][0] GUICtrlSetData($g5List1, $aInstallList[$i][3]) Next While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUISetState(@SW_ENABLE, $Form1) GUIDelete($Form5) Return $aInstallList ExitLoop Case $g5Button1 $sRead = GUICtrlRead($g5List1) If $sRead <> "" Then $iArrayPos = _ArraySearch($aInstallList, $sRead, Default, Default, Default,Default,Default, 3) If $iArrayPos > 1 Then _ArraySwap($aInstallList, $iArrayPos, $iArrayPos - 1) EndIf GUICtrlSetData($g5List1, "") For $i = 1 To $aInstallList[0][0] GUICtrlSetData($g5List1, $aInstallList[$i][3]) Next EndIf Case $g5Button2 $sRead = GUICtrlRead($g5List1) If $sRead <> "" Then $iArrayPos = _ArraySearch($aInstallList, $sRead, Default, Default, Default,Default,Default, 3) If $iArrayPos < $aInstallList[0][0] Then _ArraySwap($aInstallList, $iArrayPos, $iArrayPos + 1) EndIf GUICtrlSetData($g5List1, "") For $i = 1 To $aInstallList[0][0] GUICtrlSetData($g5List1, $aInstallList[$i][3]) Next EndIf Case $g5Button3 GUISetState(@SW_ENABLE, $Form1) GUIDelete($Form5) Return $aInstallList ExitLoop EndSwitch WEnd EndFunc Func _QueryUser() $iShowConfigSWDiag = IniRead($fIniConfig, "Settings", "ShowConfigSWDiag", 4) If $iShowConfigSWDiag = 4 Then GUISetState(@SW_DISABLE, $Form1) $iStyle2 = BitOr( $WS_CAPTION, $WS_POPUP, $WS_SYSMENU) $Form6 = GUICreate("Attention", 423, 119, Default, Default, $iStyle2) $g6Label1 = GUICtrlCreateLabel("You have unconfigured software. Do you want to configure them now?", 32, 32, 338, 17) $g6Button1 = GUICtrlCreateButton("Yes", 184, 72, 99, 25, $WS_GROUP) $g6Button2 = GUICtrlCreateButton("No", 296, 72, 99, 25, $WS_GROUP) $g6Checkbox1 = GUICtrlCreateCheckbox("Do not ask again", 32, 80, 121, 17) GUISetState() $g6ExitButton = _GUICtrlMenu_GetSystemMenu($Form6) _GUICtrlMenu_EnableMenuItem($g6ExitButton, $SC_CLOSE, 1, False) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $g6Button1 $iCBRead = GUICtrlRead($g6Checkbox1) If $iCBRead = 1 Then IniWrite($fIniConfig, "Settings", "ShowConfigSWDiag", $iCBRead) EndIf GUISetState(@SW_ENABLE, $Form1) GUIDelete($Form6) Return 1 ExitLoop Case $g6Button2 $iCBRead = GUICtrlRead($g6Checkbox1) If $iCBRead = 1 Then IniWrite($fIniConfig, "Settings", "ShowConfigSWDiag", $iCBRead) EndIf GUISetState(@SW_ENABLE, $Form1) GUIDelete($Form6) Return 0 ExitLoop EndSwitch WEnd EndIf EndFunc Func _About() GUISetState(@SW_DISABLE, $Form1) Local $Form3, $hGraphic Local Const $iWidth = 400, $iHeight = 150, $iBgColor = 0x303030 $Form3 = GUICreate("About Software Installer", 400, 300) GUISetBkColor($iBgColor, $Form3) GUISetState(@SW_SHOW) Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND($Form3) _GDIPlus_GraphicsSetSmoothingMode($hGraphics, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;sets the graphics object rendering quality (antialiasing) Local $hBrush = _GDIPlus_BrushCreateSolid(0xFFEE88BB) _GDIPlus_Startup() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($Form3) _GDIPlus_GraphicsFillRect($hGraphic, 0, 150, 400, 300, $hBrush) $Label1 = GUICtrlCreateLabel("Software Installer", 48, 16, 304, 44) GUICtrlSetFont(-1, 26, 400, 0, "Arial Rounded MT Bold") GUICtrlSetColor(-1, 0xC0C0C0) $Label2 = GUICtrlCreateLabel("Version " & $sVersion, 48, 56, 84, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") GUICtrlSetColor(-1, 0xC0C0C0) $Label3 = GUICtrlCreateLabel("Click here to go to the home page for this software", 48, 240, 300, 21) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) GUICtrlSetBkColor(-1, 0x434E54) GUICtrlSetCursor (-1, 0) $Label4 = GUICtrlCreateLabel("Scripted with AutoIt", 48, 200, 115, 20) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x808080) $Label5 = GUICtrlCreateLabel("This software is designed to help automate unattended and/or silent software installation.", 56, 96, 282, 40) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FFFF) While 1 $nmsg = GUIGetMsg() Switch $nMsg Case $Label3 ShellExecute ("https://www.autoitscript.com/forum/topic/143730-software-installer/") Case $GUI_EVENT_CLOSE _GDIPlus_BrushDispose($hBrush) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() GUISetState(@SW_ENABLE, $Form1) GUIDelete($Form3) ExitLoop EndSwitch WEnd EndFunc Archive of version 1.0:
       
    • By paw
      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?
    • By Danyfirex
      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
    • By Jgladden
      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
    • By WindIt
      Hi, 
      I have a set of excel docs 1& 2
      1) In Excel 1 i have a fixed column called dimensionId that contains list of dimensionid's with in between empty cells.
      Here, For each dimesionId, i need to check corresponding columns of L,M,N ,O(senior, mid, junior, student) & check If they contain letter Y (Open excel 2) and if empty ignore,check next.
      I need to loop through the entire column of dimensionId one by one, please help me proceed with the logic.
      2) If letter Y exists, open excel 2 and check if same dimesionId exists in column A.
      New to autoit excel automation, Help me with logic to execute this.
      #include <Excel.au3>
      Global $oExcel = _Excel_Open()
      Global $oWorkbook = _Excel_BookOpen($oExcel, "D:\yta\Trial concept dimensions list.xlsx")
      Local $read1 = _Excel_RangeRead ($oWorkbook,Default,"C3")
      MsgBox(0,"",$read1)
      Attached exce 1 doc.
       
       
      exl1.xlsx exl2.xlsx
×
×
  • Create New...