Leaderboard
Popular Content
Showing content with the highest reputation on 02/13/2017 in all areas
-
Version 1.6.3.0
17,292 downloads
Extensive library to control and manipulate Microsoft Active Directory. Threads: Development - General Help & Support - Example Scripts - Wiki Previous downloads: 30467 Known Bugs: (last changed: 2020-10-05) None Things to come: (last changed: 2020-07-21) None BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort1 point -
possible bug with arrays [NOT]
nss reacted to InunoTaishou for a topic
The reason it doesn't work is because AutoIt, currently, doesn't support maps (Which is what you're trying to do). You can assign/get a value using a string in the brackts ([]) because autoit will implicitly convert a string to 0 when it's expecting an integer but supplied a string. So what you really did was this local $r[2] $r[0]="hello" $r[0]="how are you" msgbox(64, $r[0], $r[1]) ; prints the ["test2"] but not ["test1"]. Is this even supposed to be a thing?1 point -
This works for me: local $r[2] Enum $test1, $test2 $r[$test1]="hello" $r[$test2]="how are you" msgbox(64, $r[0], $r[1])1 point
-
Coda
SkysLastChance reacted to JLogan3o13 for a topic
Melba warned you here: Then again here: And again here: And so you PM me directly not 10 minutes later to ask the same exact question?? Not the sharpest tool in the shed. Permanent Ban.1 point -
Its generally better to use the installer with switches For example: ;~ JREx64 - Install this for x64 systems only If @OSArch = 'x64' Then RunWait(@ScriptDir & '\jre-xuxx-windows-x64.exe INSTALL_SILENT=Enable STATIC=Enable AUTO_UPDATE=Disable WEB_JAVA=Enable WEB_JAVA_SECURITY_LEVEL=H WEB_ANALYTICS=0 EULA=Disable REBOOT=Disable NOSTARTMENU=Enable SPONSORS=Disable', '', @SW_HIDE) EndIf ;~ JREx86 - Install this for both x86/x64 systems RunWait(@ScriptDir & '\jre-xuxx-windows-i586.exe INSTALL_SILENT=Enable STATIC=Enable AUTO_UPDATE=Disable WEB_JAVA=Enable WEB_JAVA_SECURITY_LEVEL=H WEB_ANALYTICS=0 EULA=Disable REBOOT=Disable NOSTARTMENU=Enable SPONSORS=Disable', '', @SW_HIDE) If you want it to uninstall previous versions, just remove the Static=Enable switch then it will do a patch install (overwrites existing versions).1 point
-
AES 256 Autoit vs PHP?
ROBINHOOD3 reacted to Inververs for a topic
http://autoit-script.ru/index.php?topic=23418.msg1351071 point -
That's much easier. The code is already stored in my treeview snippets folder.1 point
-
LarsJ, It is even easier than that - adjusting the commented-out line removes the checkboxes from either root or children: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiTreeView.au3> Local $aItem[4] Local $hGUI = GUICreate("Test", 500, 500) $hTV = _GUICtrlTreeView_Create($hGUI, 10, 10, 450, 450, BitOR($WS_BORDER, $TVS_CHECKBOXES, $TVS_HASLINES, $TVS_HASBUTTONS, $TVS_LINESATROOT)) $hRoot = _GUICtrlTreeView_Add($hTV, 0, "Root") For $i = 1 To 3 $aItem[$i]= _GUICtrlTreeView_AddChild($hTV, $hRoot, "Child" & $i) Next _GUICtrlTreeView_Expand($hTV) GUISetState() ; Remove checkboxes from children - must be after GUISetState For $i = 1 to 3 _GUICtrlTreeView_SetStateImageIndex($hTV, $aItem[$i], 0) Next ; Remove checkbox from root ;_GUICtrlTreeView_SetStateImageIndex($hTV, $hRoot, 0) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Thanks for the prod to get it working. M231 point
-
Some treeview items with checkboxes and some without: I'm pretty sure it can be done in the same way as it's done for listview items here. I'll leave the details to you guys.1 point
-
Tjalve, First, let us deal with handles and ControlIDs. Windows handles are unique identifiers that the OS uses to keep track of everything on the system, such as GUIs and controls, which continually send messages around the system so that everything in the system knows what is going on (which GUI is active, which control has just been actioned, which key was pressed, etc, etc). These messages contain all sorts of data, but essentially explain "which control has just done what". AutoIt tries to make life simple for you by using ControlIDs to identify its native controls - theses IDs are actually the indIces of an internal array of all controls maintained by AutoIt. So when you look for these ControlIDs in a GUIGetMsg loop you are asking AutoIt to access the Windows message stream and pick put those messages which refer to that control - the OnEvent commands work in a similar manner. Now to how the script I posted works. As the UDF functions return handles and not ControlIDs (which as explained above are only returned by AutoIt native functions) we cannot use a GUIGetMsg loop to look for messages, so we have to do it ourselves rather than relying on AutoIt to do it for us. This is where the GUIRegisterMsg command comes into play - it peeks into the Windows message stream and lets us see what is happening. In the script above we are asking to look at WM_NOTIFY messages - a pretty comprehensive set which, amongst many other things, covers selecting items in a TreeView. When a WM_NOTIFY message is detected in the stream AutoIt then runs the allocated function or "handler" where we can examine the message in detail: We create a data structure to look at the detailed content of the message - this data is stored by Windows and we use one of the message parameters ($lParam) to access it. We then check that this message was indeed sent by the treeview by looking inside the data structure - we can ignore the vast majority of messages which have been sent by other controls. Finally we check if the message deals with a change of the selected item in the treeview - and if it does than we know that we have found the message we were looking for. And there you have it - because the treeview was created by a UDF and not by an internal AutoIt function, we had to recreate what AutoIt does for us "under the hood" and peer into the Windows message stream ourselves to intercept the message telling us that the user had selected another item in the treeview. You can see the same thing happening with tab controls if you read the Tabs tutorial in the Wiki - if you create the tab with the UDF you need to do a lot more work to make it work correctly. I hope that the above explanation makes you realise how much AutoIt does for you behind the scenes - please ask again if anything is still unclear. M231 point
-
The long awaited! Magic Number CalculatorMagic Number Calculator is a useful tool if you have code which does not uses constants but instead use magic numbers to specify Styles & ExStyles... Its Features: Small & Compact Standalone exeutableAutomatically generates the Corrected function lineMade for the lazy, Press the "Press the Paste Button", "Press the Calculate Button", Wait, "Press the Copy Button" & Done!Fast CalculationsThe Unlicensed Open Source >>> Links <<< Source & Version Archive Bug Submission & Bug Tracker >>>Download<<< https://www.autoitscript.com/forum/files/file/352-magic-number-calculator/ Please Report Bugs & Request Features in the Bug Submission form! It will help me keep track of all requests! P.S If you are not able to view the sources & version archive, please try disabling your adblocker1 point
-
Display List of Files and Allow User to Select
AnonymousX reacted to Melba23 for a topic
gruntydatsun, I assume you want multiple selections, so you are essentially limited to a ListView as a TreeView can have only one selection. _GUICtrlListView_GetSelectedIndices will give you those items selected by the user. M231 point -
KatoXY, The control is know as a Combo and you can produce one by using GUICtrlCreateCombo. If you want to fill it from an array, I would recommend doing something like this: #include <GUIConstantsEx.au3> ; Here is the array Global $aArray[5] = ["A", "B", "C", "D", "E"] ; And here we get the elements into a list $sList = "" For $i = 0 To UBound($aArray) - 1 $sList &= "|" & $aArray[$i] Next ; Create a GUI #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) ; Create the combo $hCombo = GUICtrlCreateCombo("", 10, 10, 200, 20) ; And fill it GUICtrlSetData($hCombo, $sList) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndAll clear? Please ask if not. M231 point