Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/04/2015 in all areas

  1. @willichan. Ever tried the same scenario using a map instead of array? Guess you'll like it.
    2 points
  2. Doesn't make much sense to me as the error clearly is an AUT2EXE error. Jos
    1 point
  3. Hello my friend @JScript This is not related to SciTE4AutoIt this is a issue related to your AV program. Add this location: C:\Users\Usuário\AppData\Local\AutoIt v3\Aut2exe\~AU3*.exe to exclusion list in your AV system.
    1 point
  4. add the /S parameter to the commandline. Jos
    1 point
  5. ​You can manage it when you select "Upload a new version". You can add new files or delete existing ones.
    1 point
  6. argumentum, I have deleted both - so now you can upload again. M23
    1 point
  7. SadBunny

    _RunDos and StdErr

    No need to change the function. Just call it, like this: $output = _RunWaitGet(@ComSpec & " /c dir *.exe /s /a", "c:\temp", @SW_HIDE, 1) MsgBox(0, 0, $output) Note 1: the @ComSpec & " /c part (in which the @ComSpec refers to the path to your cmd.exe) is necessary if you're going to run internal dos prompt commands (like dir). Note 2: the last parameter, that I set to 1, determines whether to capture stdout, stderr or both (see function comments).
    1 point
  8. ​This can be found on MSDN (Microsoft Developer Network). Excel Developer Reference for Excel 2010.
    1 point
  9. This works fine for me and displays cell A4 in red: #include <Excel.au3> Local $oExcel = _Excel_Open() Local $oWorkbook = _Excel_BookNew($oExcel) $oWorkbook.Sheets(1).Range("A4").Interior.ColorIndex = 3
    1 point
  10. your script works fine with me, added some line to work in my side, I put random nos. in input box and ROWS COLOR CHANGED.. #include <Excel.au3> ;added line Local $oApplM = _Excel_Open() Local $morning_insights = "C:\CheckList.xlsx" ;added line Local $oExcelM = _Excel_BookOpen($oApplM, $morning_insights) Local $aArrayM = _Excel_RangeRead($oExcelM, Default, $oExcelM.ActiveSheet.Usedrange.Columns("A:N"), 1, True) $percentage = InputBox("Capping percentage", "Enter percentage to calculate") With $oApplM.ActiveWorkbook.Sheets(1) .Range("A4").Interior.ColorIndex =3 EndWith
    1 point
  11. UEZ

    Animating GUI

    Then have a look to WinMove.
    1 point
  12. When I want to encapsulate UDF/include scope variables, I create an initialization function in the UDF that returns an array containing all of the UDF relevant variables. Then the first required variable in every function is a ByRef variable that expects that array. Kind of a poor-mans OO when a real OO might be overkill. Might seem klunky to some, but it has worked well, and eliminated the need for any of my UDFs to need Globals at all. Works nice for GUI functions as well. I set array element [0] to the GUI itself, then relevant variables follow.
    1 point
  13. I made a quick example #include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> Global $hGUI, $hStatus Global $aParts[3] = [75, 150, -1] $hGUI = GUICreate("StatusBar Set BkColor", 400, 300) GUIRegisterMsg($WM_DRAWITEM, "_WM_DRAWITEM") $hStatus = _GUICtrlStatusBar_Create($hGUI) GUISetState() ;~ _GUICtrlStatusBar_SetBkColor($hStatus, 0x5555DD) _GUICtrlStatusBar_SetParts($hStatus, $aParts) _GUICtrlStatusBar_SetText($hStatus, "Part 1", 0, $SBT_OWNERDRAW) _GUICtrlStatusBar_SetText($hStatus, "Part 2", 1, $SBT_OWNERDRAW) _GUICtrlStatusBar_SetText($hStatus, "Part 3", 2, $SBT_OWNERDRAW) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() Func _WM_DRAWITEM($hWnd, $Msg, $wParam, $lParam) #forceref $Msg, $wParam, $lParam Local $tDRAWITEMSTRUCT = DllStructCreate("uint CtlType;uint CtlID;uint itemID;uint itemAction;uint itemState;HWND hwndItem;HANDLE hDC;long rcItem[4];ULONG_PTR itemData", $lParam) Local $itemID = DllStructGetData($tDRAWITEMSTRUCT, "itemID") ;part number Local $hDC = DllStructGetData($tDRAWITEMSTRUCT, "hDC") Local $tRect = DllStructCreate("long left;long top;long right; long bottom", DllStructGetPtr($tDRAWITEMSTRUCT, "rcItem")) Local $iTop = DllStructGetData($tRect, "top") Local $iLeft = DllStructGetData($tRect, "left") Local $hBrush Switch $itemID Case 0 $hBrush = _WinAPI_CreateSolidBrush(0xFFFF00) _WinAPI_FillRect($hDC, DllStructGetPtr($tRect), $hBrush) _WinAPI_SetBkMode($hDC, $TRANSPARENT) DllStructSetData($tRect, "top", $iTop + 1) DllStructSetData($tRect, "left", $iLeft + 1) _WinAPI_DrawText($hDC, "Part 1", $tRect, $DT_LEFT) _WinAPI_DeleteObject($hBrush) Case 1 $hBrush = _WinAPI_CreateSolidBrush(0x00FF00) _WinAPI_FillRect($hDC, DllStructGetPtr($tRect), $hBrush) _WinAPI_SetBkMode($hDC, $TRANSPARENT) DllStructSetData($tRect, "top", $iTop + 1) DllStructSetData($tRect, "left", $iLeft + 1) _WinAPI_DrawText($hDC, "Part 2", $tRect, $DT_LEFT) _WinAPI_DeleteObject($hBrush) Case 2 $hBrush = _WinAPI_CreateSolidBrush(0xABCDEF) _WinAPI_FillRect($hDC, DllStructGetPtr($tRect), $hBrush) _WinAPI_SetBkMode($hDC, $TRANSPARENT) DllStructSetData($tRect, "top", $iTop + 1) DllStructSetData($tRect, "left", $iLeft + 1) _WinAPI_DrawText($hDC, "Part 3", $tRect, $DT_LEFT) _WinAPI_DeleteObject($hBrush) EndSwitch $tDRAWITEMSTRUCT = 0 Return $GUI_RUNDEFMSG EndFunc ;==>_WM_DRAWITEM
    1 point
×
×
  • Create New...