Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/28/2020 in all areas

  1. Are you annoyed by the limitations of the standard Windows message dialog created by MsgBox? Would you like to have coloured backgrounds and text? To choose the justification and font? Do you want to be able to place the message box other than in the centre of the screen? Centred on your GUI, for example, or at a particular location on screen? What about having user-defined text on as many buttons as you need? And user-defined icons? Or a visible countdown of the timeout? Finally, would you like to choose whether the message box has a button on your already too-crowded taskbar? If the answer to any of these questions is "YES" then the ExtMsgBox UDF is for you! [NEW VERSION] 16 Feb 24 Changed: Some additional functionality added to the "TimeOut" parameter of _ExtMsgBox: - A positive integer sets the EMB timeout as before. - A negative integer will double the size of the countdown timer if it is used. - A colon-delimited string (eg: "10:5") will set the normal EMB timeout (first integer) and will also initially disable the EMB buttons for the required period (second integer). New UDF and examples in the zip. Older version changes: ChangeLog.txt As always, I realise nearly all of the DLL calls in these UDFs could be made by using commands in other UDFs like WinAPI.au3 - but as with all my UDFs (which you can find in my sig below) I am trying to prevent the need for any other include files. The UDF and examples (plus StringSize) in zip format: ExtMsgBox.zip Courteous comments and constructive criticisms welcome - guess which I prefer! M23
    1 point
  2. Beege

    Tiny CPU Bar

    Here is a small and simple little script for creating a tiny cpu indicator bar that sits right above the taskbar like in the pic below. I got the idea from an android phone app called micro cpu and liked the concept. _TinyCPU.au3
    1 point
  3. halbum2040

    how to screen capture?

    Nine, I modified my code by pointing out what I didn't think of. I'm glad to know the memory leak. Thank you for your advice that has grown me even more.
    1 point
  4. So this turned out to be incorrect. Looking at the HTML you posted above, each element has it's own unique name and ID. So that seems to be the problem? 🤔
    1 point
  5. That's not enough details for us to accurately answer your question. At a minimum, you should show us the HTML for all four element, plus any associated form. P.S. If there's an associated form, then you may be able to use _IEFormElementGetCollection with an appropriate $iIndex value to retrieve each element. There's also an $iIndex parameter for _IEGetObjByName
    1 point
  6. Since the button had an ID, you should be able to use _IEGetObjById.
    1 point
  7. Every function in AutoIt returns some type of error indication if something goes wrong. _IE* functions set @error to > 0. Can you please add some debugging code to your script?
    1 point
  8. Maybe this : Local $Date = "2020/07/27 16:22:23" ;=13240351343870418 ConsoleWrite("Timestamp to Chrome/webkit = " & HumanToWebkit($Date) & @CRLF) ;OK Func HumanToWebkit($Date) Local $WebKit = _DateDiff('s', "1601/01/01 00:00:00", $Date) Local $a_TimeZoneInfo = _Date_Time_GetTimeZoneInformation() $Seconds = $a_TimeZoneInfo[1] * 60 Local $DateWebKit = $WebKit + $Seconds Return Int($DateWebKit & "000000") EndFunc ;==>HumanToWebkit
    1 point
  9. We have this awesome Report button at the top of the thread that can be used for this. That way, anyone with permissions to move or merge a topic can, instead of just two...
    1 point
  10. Simple: I see a X and a Y in a sentence, and it is a game. 2+2=5. No brainer.
    1 point
  11. Just curious, could you run this and tell me what happens : #include <Constants.au3> #include <Array.au3> $sFileName = "Test.txt" $hFile = FileOpen($sFileName, $FO_OVERWRITE) FileWriteLine($hFile, "test1") FileWriteLine($hFile, "test2") FileWriteLine($hFile, "test3") FileWriteLine($hFile, "test4") FileWriteLine($hFile, "test5") FileWriteLine($hFile, "test6") FileClose($hFile) _FileWriteToLineEX($sFileName, 3, "", True) If @error Then MsgBox ($MB_SYSTEMMODAL,"error", @error) MsgBox ($MB_SYSTEMMODAL,"","Ended") Func _FileWriteToLineEX($sFilePath, $iLine, $sText, $bOverWrite = False, $bFill = False) If $bOverWrite = Default Then $bOverWrite = False If $bFill = Default Then $bFill = False If Not FileExists($sFilePath) Then Return SetError(2, 0, 0) If $iLine <= 0 Then Return SetError(4, 0, 0) If Not (IsBool($bOverWrite) Or $bOverWrite = 0 Or $bOverWrite = 1) Then Return SetError(5, 0, 0) If Not IsString($sText) Then $sText = String($sText) If $sText = "" Then Return SetError(6, 0, 0) EndIf If Not IsBool($bFill) Then Return SetError(7, 0, 0) ; Read current file into array Local $aArray = FileReadToArray($sFilePath) ; Create empty array if empty file If @error Then Local $aArray[0] _ArrayDisplay ($aArray, "Before mod") Local $iUBound = UBound($aArray) - 1 ; If Fill option set If $bFill Then ; If required resize array to allow line to be written If $iUBound < $iLine Then ReDim $aArray[$iLine] $iUBound = $iLine - 1 EndIf Else If ($iUBound + 1) < $iLine Then Return SetError(1, 0, 0) EndIf ; Write specific line - array is 0-based so reduce by 1 - and either replace or insert $aArray[$iLine - 1] = ($bOverWrite ? $sText : $sText & @CRLF & $aArray[$iLine - 1]) ; Concatenate array elements Local $sData = "" For $i = 0 To $iUBound $sData &= $aArray[$i] & @CRLF Next $sData = StringTrimRight($sData, StringLen(@CRLF)) ; Required to strip trailing EOL $aArray = StringSplit ($sData, @CRLF, $STR_ENTIRESPLIT+$STR_NOCOUNT) _ArrayDisplay ($aArray, "After mod") ; Write data to file Local $hFileOpen = FileOpen($sFilePath, $FO_OVERWRITE) If $hFileOpen = -1 Then Return SetError(3, 0, 0) FileWrite($hFileOpen, $sData) FileClose($hFileOpen) Return 1 EndFunc
    1 point
  12. This will satisfy #include <WindowsConstants.au3> #include <WinAPI.au3> #include <GuiListBox.au3> #include <ScrollBarConstants.au3> #include <Misc.au3> Global Const $WS_EX_NOACTIVATE = 0x08000000 GUICreate("", 300, 400, -1, -1, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_NOACTIVATE)) GUISetBkColor(0xC0CCFF) Global $iExit = GUICtrlCreateButton("Exit", 10, 10) GUISetState(@SW_SHOWNOACTIVATE) Do Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $iExit ExitLoop Case $GUI_EVENT_PRIMARYDOWN ConsoleWrite("Mouse Down over GUI" & @CRLF) EndSwitch Until 0 Note: with WS_EX_NOACTIVATE there would be no taskbar icon. You have to Or the ex-style with WS_EX_APPWINDOW to make it appear on taskbar. But be aware that clicking the taskbar icon would make the window active Thumbs up if it helped. Regards
    1 point
×
×
  • Create New...