Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/22/2019 in Posts

  1. I just noticed that Outlook does not allow to import iCal events programmatically. I might implement some of the iCalendar data format (RFC 5545) if someone is interested Please post here or click the "Like" button if you think this is a good idea Edit: For download please see my signature
    1 point
  2. loading a ps1 and using it: You can use fileinstall if you need the ps1 packaged up with the script. It would be cooler to write it on the fly tho
    1 point
  3. That is true, but seems the OP does not mind that? Your method is better though, should he need to change to preserve new entries.
    1 point
  4. @dmob Thought of that at first, but you would lose any added entries, added during edit mode. So you would have to copy the contents between each combo box. Thought this method would be easier.
    1 point
  5. Another way would be to create both then hide/unhide based on checkbox.
    1 point
  6. I don't believe this can be done, the closest thing I can think of is the following: Global $idComboBox ... .. . $idComboBox = GUICtrlCreateCombo($aComboList[0], 10, 10, 185, 20, $CBS_DROPDOWN) GuiCtrlSetData($idComboBox, _ArrayToString($aComboList),$aComboList[2]) ... .. . Case $idCheckBox If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then Read_only(True) Else Read_only(False) Endif ... .. . Func Read_only($bReadOnly = False) Local $sComboBox = GUICtrlRead($idComboBox) Local $aComboBox = _GUICtrlComboBox_GetListArray($idComboBox) Local $iComboStyle = $bReadOnly ? $CBS_DROPDOWNLIST : $CBS_DROPDOWN GUICtrlDelete($idComboBox) $idComboBox = GUICtrlCreateCombo("", 10, 10, 185, 20, $iComboStyle) GUICtrlSetData($idComboBox, _ArrayToString($aComboBox, "|", 1), $sComboBox) EndFunc
    1 point
  7. Gianni

    Count down MsgBox

    ; open a detached MsgBox and get handle $hwMSG = _MsgBox(0, "Hello", "Content", 5) ; auto close in 5 seconds ; get handle of the text label $hMSGtext = ControlGetHandle($hwMSG, "", "[CLASS:Static; INSTANCE:1]") ; get handle of the OK button $hButton = ControlGetHandle($hwMSG, "", "[CLASS:Button; INSTANCE:1]") $countdown = 4 While WinExists($hwMSG) ; wait the autoclose of the MsgBox ; change the text in the MsgBox ControlSetText($hwMSG, '', $hMSGtext, "Off in " & $countdown & " sec") ; label ControlSetText($hwMSG, '', $hButton, $countdown) ; ok button Sleep(1000) $countdown -= 1 WEnd ; spawn a detached MsgBox and returns an handle Func _MsgBox($flag = 0, $title = '', $text = '', $timeout = 0) Local $sCommand = 'MsgBox(' & $flag & ', "' & $title & '", "' & $text & '", ' & $timeout & ')' $sCommand = '"' & StringReplace($sCommand, '"', '""') & '"' Local $hPID = Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & $sCommand) Sleep(1000) ; Retrieve a list of window handles. (MsgBox included) Local $aList = WinList(), $hwMSGBOX For $i = 1 To $aList[0][0] If WinGetProcess($aList[$i][1]) = $hPID Then $hwMSGBOX = $aList[$i][1] ExitLoop EndIf Next Return $hwMSGBOX EndFunc ;==>_MsgBox
    1 point
  8. Melba23

    Count down MsgBox

    Ahihi, My ExtMsgBox UDF (the link is in my sig) can run a countdown for you - run "Test 6" in Example 1 in the zip. M23
    1 point
  9. It means exactly that. I've never tested it, and I'm not aware of anyone else ever posting a test result of that. Frankly, in all of the scripts I've done, the only time speed of execution comes up for me is if it's doing something that requires timing constraints. Everything else is, "it gets done when it finishes", the time it takes to do it is secondary to making sure it gets done right.
    1 point
  10. Did you try my previous code ? a little adaptation gives this (based precisely on the provided requirements) : $txt = FileRead("1.txt") $out = "items4" $new = StringRegExpReplace($txt, '(?m)^.*\Q' & $out & '\E.*$', "") FileWrite("new.txt", $new)
    1 point
  11. my sample, not read window..... conect on $user = "root" $password ="" $host ="5.0.0.1" $port ="22" $puty_exe = @ScriptDir & "\putty.exe"; putty salve local folder script ; putty -ssh -l usuario 5.0.0.1 p "port" -pw senha ;input $command = RunWait(@comspec & " /C "&$puty_exe&" -ssh -l "&$user&" "&$host&" p "&$port&" -pw "&$password,@ScriptDir, @SW_HIDE, 1) ;$command = RunWait(@comspec & " /C "&$puty_exe&" system scripts run mario",@ScriptDir, @SW_HIDE, 1) While 1 $data = StdoutRead($command) ConsoleWrite($data&@CRLF) If @error Then ExitLoop Wend
    1 point
×
×
  • Create New...