Leaderboard
Popular Content
Showing content with the highest reputation on 09/18/2020 in all areas
-
This is one of the most stupidest post ik have ever seen here... And I've seen a lot You probably have no idea why I said this until you figure it out somehow.2 points
-
@Danyfirex has identified that the issue originates in the BinaryCall UDF, which gets called by the JSON UDF. It registers an OnAutoITExitRegister function, that is freeing resources before the main OnAutoITExitRegister function gets executed. @TheXman Your example works because it registers the BinaryCall exit routine before the main OnAutoITExitRegister routine is registered, so exit events now occur in the desired order. You can also accomplish this by adding the following before calling OnAutoITExitRegister Json_Decode("") Will release an update to the UDF once we come up with a more permanent fix.1 point
-
It also does not occur if you move the registering of _OnExit() AFTER Demo() in the main script. It looks like as long as OnAutoITExitRegister() is NOT the first function called in the script, it works fine. #include <JSON.au3> Demo() OnAutoItExitRegister("_onExit") Demo() Func _onExit() Demo() EndFunc Func Demo() Local $sJSON = '{"value":null}' ConsoleWrite("pre Json_Decode" & @CRLF) Local $oJSON = Json_Decode($sJSON) ConsoleWrite("post Json_Decode" & @CRLF) EndFunc1 point
-
My pc was rebooted (security update) and the files are gone so I can't recreate this anymore. Perhaps those files were locked and I couldn't delete them but that doesn't explain why I was able to delete them (and restore them from the recycle bin) over and over. The bottom line is that I was hoping fileDelete was using @extended to return more information when a file can't be deleted. Musashi, I like the fileinuse logic and I will incorporate that into my temp files cleanup routine.1 point
-
1 point
-
When it comes to large amount of control ids within an array I try to group the controls, i.e. 200, 201, 202 etc... then you can just use Case Array[0] To Array[LastRow], example: For $iIndex = 0 to UBound($Names, 1) - 1 $aGroupNames[$iIndex][0] = $iIndex & "|" & $Names[$iIndex][1] & "|" & $Names[$iIndex][0] $aGroupNames[$iIndex][1] = GUICtrlCreateGroup($Names[$iIndex][0] &" "& $Names[$iIndex][1], 70, 100+$iIndex*110, 600, 100,-1,0x400000) $aGroupNames[$iIndex][2] = GUICtrlCreateDate("2020/10/" & Random(23, 26), 550, 150+$iIndex*110, 100, 20) Next For $iIndex = 0 To UBound($Names) - 1 $aGroupNames[$iIndex][3] = GUICtrlCreateButton("Button " & $iIndex, 550, 130+$iIndex*110, 100, 20) Next GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitLoop Case $GUI_EVENT_RESTORE _GUIScrollbars_Restore($hGUI) Case $GUI_EVENT_MINIMIZE _GUIScrollbars_Minimize($hGUI) Case $aGroupNames[0][3] To $aGroupNames[UBound($aGroupNames) - 1][3] MsgBox(4096, "", GUICtrlRead($nMsg)) EndSwitch WEnd1 point
-
You're right, in fact if I put the same _onExit content instead of Exit, it works well! So the problem should be in OnAutoItExitRegister("_onExit") and the call of that func.1 point
-
AutoIt Snippets
DonChunior reacted to TheDcoder for a topic
I agree with @DonChunior, their version uses StringIsDigit while @jchd's version uses RegEx, it is a matter of opinion which is simpler, not all people know or like RegEx1 point -
Yes... with some restrictions. There's already some info in the Wiki FAQ, but I believe that pertains mostly to Firefox. I've done some testing with Chrome, and it's possible. Can't recall if the details have been posted here or not. The same method should work for Edge since it operates on the same code base as Chrome. P.S. Please stick to one thread and don't cross post your questions 😉1 point
-
_PathSplitByRegExp()
xJilo reacted to marcgforce for a topic
dear xJilo i believe you're not very familiar with autoit and scripting, so train yourself with basic training courses before asking help for this, to be honest, become familiar with variables, constants, arrays etc... and it will be more easy for you to understand code from autoit.1 point -
AutoIt Snippets
TheDcoder reacted to DonChunior for a topic
That's a matter of opinion. 😉 I find my variant more comprehensible.1 point -
You should go back and research how AHK got its start.1 point
-
GuiCtrlCreateDummy with Child window not working
Letraindusoir reacted to pixelsearch for a topic
Just wanted to share with you an explanation I just found at Microsoft's : "Only a top-level window can be an active window. When the user is working with a child window, the system activates the top-level parent window associated with the child window." https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features So if the child window can never be the Active window, then it seems to me that Accelerators keys should always be linked to the parent window. That's why the Enter Key can't be triggered in the script above (as it is linked to the child window)1 point -
_IENavigate with Microsoft Edge
Gianni reacted to seadoggie01 for a topic
First, I highly suggest not using IE and switching to WebDriver. IE is going to be unsupported soon (iirc) and is becoming more difficult to work with (imho). However, I have had things that will only work in IE for some reason, so I've had to work with it in the past. I get this issue a lot when creating IE. I think I use something like this as a workaround... (replace _IECreate with __IECreate in your code) ; (Requires <IE.au3>) Func __IECreate($sUrl = "about:blank", $iTryAttach = 0, $iVisible = 1, $iWait = 1, $iTakeFocus = 1) ; Attempt to call the normal method Local $oIE = _IECreate($sUrl, $iTryAttach, $iVisible, $iWait, $iTakeFocus) ; If the client disconnected, try to find it again If @error = $_IEStatus_ClientDisconnected Then ConsoleWrite(" Internal Error: " & @error & " Waiting 2 seconds to try attaching." & @CRLF) Sleep(2000) ; Try to attach using the URL (You may need to check for ANY instance at this point, as it might not have navigated to the URL before disconnecting) $oIE = _IEAttach($sUrl, "url") ; If we failed to attach, then return that the client disconnected If @error Then Return SetError($_IEStatus_ClientDisconnected, @error, False) EndIf Return $oIE EndFunc Also, after you call a function, you should check the @error code to see if the code ran successfully. For example, _IECreate has 6 different errors that can be generated. Check the help file to see more information on each of these. Finally, when you have an issue like this, try searching the forums a little more... I know it can be frustrating, but I found the answer to this by searching $_IESTATUS_ClientDisconnected and clicking on the first link1 point -
Hi! Why don't the AutoIt-developer contract in the development of AutoHotKey (https://www.autohotkey.com/) ? Seems they have similar goals. And AHK is OpenSource. So it is easy to contribute there. Btw: Why haven't AutoIt published any code? Is there 3rd party code integrated, so that it isn't possible? Greetings theuserbl0 points