-
Posts
26,696 -
Joined
-
Last visited
-
Days Won
204
water last won the day on March 1
water had the most liked content!
About water

water's Achievements
-
Word - search/replace issue with SPECIFIC document
water replied to gerardsweeney's topic in AutoIt General Help and Support
Have a look at the source of the Word UDF, function _Word_DocFindReplace to see how it works -
A couple of questions about the tab control
water replied to MattHiggs's topic in AutoIt GUI Help and Support
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 -
A couple of questions about the tab control
water replied to MattHiggs's topic in AutoIt GUI Help and Support
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 -
WildByDesign reacted to a post in a topic: Creating a "brushed up" Task Scheduler UDF?
-
Creating a "brushed up" Task Scheduler UDF?
water replied to water's topic in AutoIt General Help and Support
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 -
Word - search/replace issue with SPECIFIC document
water replied to gerardsweeney's topic in AutoIt General Help and Support
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 -
WildByDesign reacted to a post in a topic: Resizable status bar without SBARS_SIZEGRIP
-
Resizable status bar without SBARS_SIZEGRIP
water replied to WildByDesign's topic in AutoIt GUI Help and Support
I would simply use the constant $SBARS_SIZEGRIP. -
WildByDesign reacted to a post in a topic: Resizable status bar without SBARS_SIZEGRIP
-
Resizable status bar without SBARS_SIZEGRIP
water replied to WildByDesign's topic in AutoIt GUI Help and Support
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 -
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.
-
I added your UDF to the wiki
-
Active Directory UDF - Help & Support (III)
water replied to water's topic in AutoIt General Help and Support
👍- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
water replied to water's topic in AutoIt General Help and Support
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).- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
water replied to water's topic in AutoIt General Help and Support
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.- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
water replied to water's topic in AutoIt General Help and Support
You could try to set parameter $iDepth of function _AD_RecursiveGetGroupMembers to 0 and parameter $sFQDN to False.- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
CreateSemaphoreW and CreateFileMappingW in SciTE
water replied to KaFu's topic in AutoIt General Help and Support
My first questions would be: Which version of AutoIt do you run? Which version of Windows do you run? -
Nine reacted to a post in a topic: Round Corner GUI and Controls UDF
-
Added to the wiki