Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/27/2016 in Posts

  1. matias, Post this question again in any form and you will be removed from the community. M23
    1 point
  2. [NEW VERSION] - 27 May 16 Added: Ability to choose HotKey to begin editing an item via new _GUIListViewEx_SetEditKey function New zip in first post. M23
    1 point
  3. Have you considered making ISN a Portable App? This would fix permissions issues mentioned above as well as allow us to create programs from our flash drives or cloud drives (such as dropbox, google drive, or mega) without having to install AutoIt or ISN to the operating system. I have an app in my signature to help get you started or if you would allow me, I would love to make a portable version on your behalf. Let me know what I can do for you.
    1 point
  4. JLogan3o13

    Url status check?

    @youtuber please upload your text file again if you intended it to be in the post, the link became corrupted.
    1 point
  5. $wmic = Run(@ComSpec & " /c" & @ComSpec & ' /c ' & "wmic diskdrive get serialnumber","", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $Output = "" While 1 $Output &= StdoutRead($wmic) If @error Then ExitLoop Wend $sOutput=StringSplit($Output,@CR) for $a=1 to $sOutput[0] ConsoleWrite($sOutput[$a]) next $vol = Run(@ComSpec & " /c" & @ComSpec & ' /c ' & "vol C:","", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $Output = "" While 1 $Output &= StdoutRead($vol) If @error Then ExitLoop Wend $sOutput=StringSplit($Output,@CR) for $a=1 to $sOutput[0] ConsoleWrite($sOutput[$a]) next
    1 point
  6. scintilla4evr

    Advanced Math UDF

    Version 1.4: Added SolveDiff() for numerically solving differential equations Added Fresnel integrals (FresnelC and FresnelS) Added some statistical functions (more later) Added Clausen() Added IncompleteGamma() Added basic genetic algorithm functions (see Genetic.au3) Fixed issues with _Degree(), _Radian() and _MathCheckDiv() I'll try to make an example of a genetic algorithm and include it in the next version. Advanced Math UDF
    1 point
  7. AutoBert

    is mouse over GUI?

    This func does the job: Func _MouseIsOverHWnd($hWnd) Local $bMouseOver If not WinActive($hWnd) then return False Local $aMousePos = MouseGetPos() Local $aWinPos = WinGetPos($hWnd) if ($aMousePos[0] < $aWinPos[0] Or $aMousePos[0] > $aWinPos[0] + $aWinPos[2]) Or ($aMousePos[1] < $aWinPos[1] Or $aMousePos[1] > $aWinPos[1] + $aWinPos[3]) Then $bMouseOver = False Else $bMouseOver = True EndIf Return $bMouseOver EndFunc ;==>_MouseIsOverHWnd
    1 point
  8. gobsor, I have found that the only reliable way to highlight ListView rows is to use _GUICtrlListView_ClickItem to simulate mouse clicks: #include <GuiConstants.au3> #include <GuiListView.au3> #include <File.au3> GUICreate("test", 500, 500) $hListView = GUICtrlCreateListView("", 5, 5, 490, 400, $LVS_SINGLESEL, $LVS_EX_GRIDLINES + $LVS_EX_FULLROWSELECT) _GUICtrlListView_AddColumn($hListView, "#", 30) _GUICtrlListView_AddColumn($hListView, "A", 170) _GUICtrlListView_AddColumn($hListView, "B", 170) $idLoad = GUICtrlCreateButton("LOAD", 295, 410, 200, 80) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg == $GUI_EVENT_CLOSE Then ExitLoop If $msg == $idLoad Then _load() WEnd Func _load() $path = FileSelectFolder("Browse Folder", @DesktopDir, 4) If Not @error Then $ar = _FileListToArray($path, "*.*") For $i = 0 To UBound($ar)-1 Step 1 GUICtrlCreateListViewItem($i & "|" & $ar[$i] & "|" & "test", $hListView) Next ; Simulate a mouse click on the top item _GUICtrlListView_ClickItem($hListView, 0) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< EndIf EndFunc ;==> _load() Clicking with the mouse will obviously highlight a row as it does in reality what the code above simulates. For buttons, just use code as above. M23
    1 point
  9. That works quite well Cusem. Here's a variation. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 633, 300, 197, 123) ;--->>> Example GroupBox(30, 30, 300, 100, 120, 26, "Group box Number 1") GroupBox(30, 170, 300, 100, 120, 0, "Group box Number 2") ;<<<--- Example GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func GroupBox($x, $y, $w, $h, $lw = 0, $lh = 0, $lText = '') ;X-Pos, Y-Pos, Width, Height If $lh = 0 And $lText = '' Then $lw = 0 ;--->>> Top Local $lbltoL = GUICtrlCreateLabel("", $x + 1, $y, 10 - 1, 2) Local $lbltoR = GUICtrlCreateLabel("", $x + 10 + $lw, $y, $w - 10 - $lw, 2) Local $lbltiL = GUICtrlCreateLabel("", $x, $y + 2, 10, 1, $WS_CLIPSIBLINGS) Local $lbltiR = GUICtrlCreateLabel("", $x + 10 + $lw, $y + 2, $w - 2 - 10 - $lw, 1, $WS_CLIPSIBLINGS) Local $lblrbL = GUICtrlCreateLabel("", $x + 4, $y + 4, 10 - 4, 1, $WS_CLIPSIBLINGS) Local $lblrbR = GUICtrlCreateLabel("", $x + 10 + $lw, $y + 4, $w - 4 - 10 - $lw, 1, $WS_CLIPSIBLINGS) GUICtrlSetBkColor($lbltoL, 0xD4D0C8) GUICtrlSetBkColor($lbltiL, 0x808080) GUICtrlSetBkColor($lblrbL, 0xC0C0C0) GUICtrlSetBkColor($lbltoR, 0xD4D0C8) GUICtrlSetBkColor($lbltiR, 0x808080) GUICtrlSetBkColor($lblrbR, 0xC0C0C0) ;<<<--- Top ;--->>> Bottom Local $lblbo = GUICtrlCreateLabel("", $x, $y + $h + 1, $w, 2) Local $lblbi = GUICtrlCreateLabel("", $x + 1, $y + $h, $w - 3, 1, $WS_CLIPSIBLINGS) Local $lblbb = GUICtrlCreateLabel("", $x + 4, $y + $h - 1, $w - 8, 1, $WS_CLIPSIBLINGS) GUICtrlSetBkColor($lblbo, 0xA0A0A4) GUICtrlSetBkColor($lblbi, 0xFFFFE1) GUICtrlSetBkColor($lblbb, 0xC0C0C0) ;<<<--- Bottom ;--->>> Left Local $lbllo = GUICtrlCreateLabel("", $x, $y, 2, $h + 2) Local $lblli = GUICtrlCreateLabel("", $x + 2, $y + 3, 1, $h - 3) Local $lbllb = GUICtrlCreateLabel("", $x + 4, $y + 4, 1, $h - 4, $WS_CLIPSIBLINGS) GUICtrlSetBkColor($lbllo, 0xD4D0C8) GUICtrlSetBkColor($lblli, 0xA0A0A4) GUICtrlSetBkColor($lbllb, 0xC0C0C0) ;<<<--- Left ;--->>> Right Local $lblro = GUICtrlCreateLabel("", $x + $w - 1, $y, 2, $h + 3) Local $lblri = GUICtrlCreateLabel("", $x + $w - 2, $y + 2, 1, $h - 1) Local $lblrb = GUICtrlCreateLabel("", $x + $w - 4, $y + 4, 1, $h - 4, $WS_CLIPSIBLINGS) GUICtrlSetBkColor($lblro, 0xD4D0C8) GUICtrlSetBkColor($lblri, 0x808080) GUICtrlSetBkColor($lblrb, 0xC0C0C0) ;<<<--- Right If $lw > 0 And $lh > 0 Then GroupBox($x + 10, $y - $lh / 2, $lw, $lh) If $lText <> "" Then If $lh = 0 Then $lh = 22;needs real way to decide label height here, just done to make example work GUICtrlCreateLabel($lText, $x + 18, $y - $lh / 2 + 7) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) EndIf EndFunc ;==>GroupBox
    1 point
×
×
  • Create New...