Jump to content

water

MVPs
  • Posts

    26,699
  • Joined

  • Last visited

  • Days Won

    204

water last won the day on March 1

water had the most liked content!

About water

Recent Profile Visitors

12,331 profile views

water's Achievements

  1. Your modified version works like a champ! No re-download of the AutoItObject UDF was necessary. Thanks!
  2. I use InireadSection and IniwriteSection to handle Ini-Files. Each section holds all keys/values belonging to the same "class". It only takes a single command to read all keys/values to a 2D array. Works perfectly here
  3. I just downloaded your script and AutoItObject 1.2.8.2. I'm running Autoit 3.3.16.1 on Windows 11. When running your script I get the following error: Did I miss something?
  4. Have a look at the source of the Word UDF, function _Word_DocFindReplace to see how it works
  5. Toolstips can work this way. Hover over the header of the Tab control. #include <AutoItConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Launch Spice", 485, 220, 201, 136) $Tab1 = GUICtrlCreateTab(16, 16, 457, 140, BitOR($TCS_FOCUSONBUTTONDOWN, $TCS_TOOLTIPS)) GUICtrlCreateTabItem("Single") ; TOOLTIP for TAB 0 GUICtrlSetStyle(-1, $TCS_TOOLTIPS) GUICtrlSetTip(-1, " Tip for Tab 'Single'", "Testtitel", $TIP_INFOICON, $TIP_CENTER) $Label1 = GUICtrlCreateLabel("Single VM", 181, 40, 194, 33) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Input1 = GUICtrlCreateInput("", 96, 95, 297, 28, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NOHIDESEL)) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateTabItem("Multi") $Label2 = GUICtrlCreateLabel("Multiple VMs", 170, 40, 194, 33) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Input2 = GUICtrlCreateInput("", 96, 95, 297, 28, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NOHIDESEL)) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateTabItem("Lookup") $Label3 = GUICtrlCreateLabel("Lookup VM", 170, 40, 194, 33) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Input3 = GUICtrlCreateInput("", 96, 95, 297, 28, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NOHIDESEL)) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateTabItem("") $Button1 = GUICtrlCreateButton("Deploy", 186, 165, 113, 41) ; GUICtrlSetState ( -1, $GUI_DISABLE ) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetCursor(-1, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(0, "Test", "Tab " & GUICtrlRead($Tab1) & " selected.") EndSwitch WEnd
  6. Yes there is GUICtrlRead($Tab1) returns the index of the selected tabitem (0-based). Example: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Launch Spice", 485, 220, 201, 136) $Tab1 = GUICtrlCreateTab(16, 16, 457, 140, BitOR($TCS_FOCUSONBUTTONDOWN,$TCS_TOOLTIPS)) GUICtrlCreateTabItem("Single") $Label1 = GUICtrlCreateLabel("Single VM", 181, 40, 194, 33) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Input1 = GUICtrlCreateInput("", 96, 95, 297, 28, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NOHIDESEL)) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateTabItem("Multi") $Label2 = GUICtrlCreateLabel("Multiple VMs", 170, 40, 194, 33) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Input2 = GUICtrlCreateInput("", 96, 95, 297, 28, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NOHIDESEL)) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateTabItem("Lookup") $Label3 = GUICtrlCreateLabel("Lookup VM", 170, 40, 194, 33) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Input3 = GUICtrlCreateInput("", 96, 95, 297, 28, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NOHIDESEL)) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateTabItem("") $Button1 = GUICtrlCreateButton("Deploy", 186, 165, 113, 41) ; GUICtrlSetState ( -1, $GUI_DISABLE ) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(0, "Test", "Tab " & Guictrlread($Tab1) & " selected.") EndSwitch WEnd
  7. Gladyou like the UDF The thanks for this function go to the author of the original code: mLipok. I just stripped it down to it's current size
  8. I would start with collecting information about the document and adding error checking. Something like: Consolewrite("Number of Stories:" & $oDoc.StoryRanges & @CRLF) For $oStoryRange In $oDoc.StoryRanges Consolewrite(@CRLF & "Type of Story:" & $oStoryRange.StoryType & @CRLF) ; For $Loop = 1 to 1 ; Not needed at the moment _Word_DocFindReplace($oDoc, "FIRSTNAME", $FirstName, Default, $oStoryRange) Consolewrite("@error of Replace1: " & @error & @CRLF) _Word_DocFindReplace($oDoc, "SECONDNAME", $Surname, Default, $oStoryRange) Consolewrite("@error of Replace2: " & @error & @CRLF) _Word_DocFindReplace($oDoc, "BUILDINGNAME", $Building, Default, $oStoryRange) Consolewrite("@error of Replace3: " & @error & @CRLF) _Word_DocFindReplace($oDoc, "000000000", $ID, Default, $oStoryRange) Consolewrite("@error of Replace4: " & @error & @CRLF) ; Next Next The wdstorytype enumeration can be found here: https://learn.microsoft.com/en-us/office/vba/api/word.wdstorytype
  9. I would simply use the constant $SBARS_SIZEGRIP.
  10. I'm not sure this is what you are asking for. But I'll give it a try. I use the following function (written by Melba23) to remove style settings from controls: ; #INTERNAL_USE_ONLY#============================================================================================================ ; Name ..........: __Remove_Style ; Description ...: Remove a style from a single or multiple GUI controls. ; Syntax ........: __Remove_Style($iStyleToRemove, $id1[, $id2 = 0[, $id3 = 0[, $id4 = 0[, $id5 = 0[, $id6 = 0[, $id7 = 0[, $id8 = 0[, $id9 = 0[, $id10 = 0]]]]]]]]]) ; Parameters ....: $iStyleToRemove - integer value of the style to remove. ; $id1 - ControlID to remove the style from. ; $id2 to $id10 - [optional] additional ControlIDs to remove the style from. ; Return values .: Success - 0 ; Failure - None ; Author ........: Melba23 ; Modified ......: ; Remarks .......: Code taken from: https://www.autoitscript.com/forum/topic/209900-ignore-control-in-taborder/?tab=comments#comment-1515251 ; Related .......: ; Link ..........: ; Example .......: ; =============================================================================================================================== Func __Remove_Style($iStyleToRemove, $id1, $id2 = 0, $id3 = 0, $id4 = 0, $id5 = 0, $id6 = 0, $id7 = 0, $id8 = 0, $id9 = 0, $id10 = 0) #forceref $id1, $id2, $id3, $id4, $id5, $id6, $id7, $id8, $id9, $id10 Local $hControl, $iStyle For $i = 1 To @NumParams - 1 ; @NumParams must be between 2 and 11. The 1st parameter will always be the style to remove. $hControl = GUICtrlGetHandle(Eval("id" & $i)) $iStyle = _WinAPI_GetWindowLong($hControl, $GWL_STYLE) If BitAND($iStyle, $iStyleToRemove) = $iStyleToRemove Then _ _WinAPI_SetWindowLong($hControl, $GWL_STYLE, BitXOR($iStyle, $iStyleToRemove)) Next EndFunc ;==>__Remove_Style
  11. How about this: Open the AutoIt help file Select "Content" Click on "Function Reference" Click on "File, Directory and Disk Management" or Open the AutoIt help file Select "Content" Click on "User Defined Functions Reference" Click on "File Management" There you'll find all you need. If you have problems with a function we will be happy to help. In this case provide as much information as possible. The main goal of the forum is to help coders solve their problems not to spoon feed them with solutions.
  12. I added your UDF to the wiki
  13. Will put your request onto my to-do-list. What I will be working on in the next few months is the ability to request additional properties to be returned by the LDAP query. Example: _AD_GetAccountsExpired now only returns the FQDN, the expiration date/time in UTC and local time of expired accounts. You will then be able to request additional properties like sn, givenname etc. As long as they belong to the same class ("user" in this example).
  14. I understand what you are asking for. On the one hand, I'm very busy at the moment, and on the other, I no longer have access to an AD system. At the moment I can only offer the solution described in my previous post. Or you can use the internal function _AD_FQDNToSamaccountname to translate the results.
×
×
  • Create New...