Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/19/2024 in all areas

  1. Another way less hacky maybe : #include <GUIConstantsEx.au3> #include <Misc.au3> If Not _Singleton("MyGui", 1) Then Exit WinSetState("gui V1.1.1", "", @SW_SHOW) + WinSetState("gui V1.1.1", "", @SW_RESTORE) $gui = GUICreate("gui V1.1.1", 445, 262, -1, -1, -1, -1) $button = GUICtrlCreateButton("Button", 60, 20, 100, 30, -1, -1) $bHide = GUICtrlCreateButton("Hide", 60, 60, 100, 30, -1, -1) $label = GUICtrlCreateLabel("My Text", 80, 100, 50, 15, -1, -1) $label2 = GUICtrlCreateLabel("My Text", 80, 130, 50, 15, -1, -1) GUISetState(@SW_SHOWMINIMIZED) WinSetState($gui, "", @SW_HIDE) $counter = 0 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $button $counter += 1 GUICtrlSetData($label, $counter) Case $bHide WinSetState($gui, "", @SW_HIDE) EndSwitch WEnd Yes, it made me laugh too...
    3 points
  2. ...and done. We'll continue on in a PM.
    1 point
  3. Nine

    Progress bar

    Salutations @teodoric666. Here how I would do it : #include <File.au3> Local $sDate = @MDAY & "-" & @MON Local $sSource = "C:\Users\" & @UserName & "\AppData\" Local $sBackupPath = "D:\" & $sDate & '\Backup\' Local $aList = _FileListToArrayRec($sSource, "*||LocalLow", $FLTAR_FILES, $FLTAR_RECUR, $FLTAR_NOSORT, $FLTAR_RELPATH) ProgressOn("Backup " & $sDate, "0% completed") Local $nProgress, $nPrec For $i = 1 To $aList[0] FileCopy($sSource & $aList[$i], $sBackupPath & $aList[$i], $FC_OVERWRITE + $FC_CREATEPATH) $nProgress = Int($i / $aList[0] * 100) If $nProgress = $nPrec Then ContinueLoop ProgressSet($nProgress, $nProgress & "% completed") $nPrec = $nProgress Next ProgressSet(100, "Backup completed") Sleep(2000) ProgressOff()
    1 point
  4. Thanks I updated the script
    1 point
  5. Yes, I came up with this idea earlier. Look a few posts above It seems that there is no other way to do it. But thank you for your help
    1 point
  6. EDIT : I've added a pause feature for the snake. You can now press the S key to put the game on hold and take a coffee break.
    1 point
  7. well, I got it. Thanks for the illuminating explanation! So WV2Interfaces.au3 is still under construction. If I were able I could collaborate in compiling those parameters, but I'm afraid I would do more harm than good ... I think this ExecuteScript function is very useful. I'm sorry, I hope I'm not too boring, but I would be interested in understanding how to set up for this function also the part related to receiving the result of the script that has been executed, that is; ExecuteScript(LPCWSTR javaScript, ICoreWebView2ExecuteScriptCompletedHandler *handler), so to be able to use the related callback function in our script. Thanks so much again for any help P.S. In my previous post I've embedded in the script a quite long Html listing. Well, if someone is interested, I've used an easy and quick way to generate that ready to be pasted in the AutoIt script 1) Find the the HTML/Javascript listing that you want to embedd in your AutoIt listing and copy it to the clipboard. (that is select it and hit ctrl-c) 2) run this little snippet, It reads the listing that is in the clipboard, prepare it for the pasting and, after the tranformation, puts it again in the clipboard. Local $sFuntionName = "_GetSource" Local $sVarName = "$sSource" Local $aStr = StringSplit(ClipGet(), @CRLF, 1) ; get the clipboard content Local $sListing = "Func " & $sFuntionName & "()" & @CRLF $sListing &= 'Local ' & $sVarName & ' = ""' & @CRLF For $i = 1 To $aStr[0] $sListing &= $sVarName & ' &= "' & StringReplace($aStr[$i], '"', '""') & '" & @CRLF' & @CRLF Next $sListing &= "Return " & $sVarName & @CRLF $sListing &= "EndFunc" ClipPut($sListing) ; ConsoleWrite($sListing) 3) paste the clipboard in your listing (hit ctrl-v) have fun
    1 point
×
×
  • Create New...