Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/07/2019 in all areas

  1. Sorry that I wasn't clear about that: $gotoDate = GUICtrlCreateButton("Go to Date", 340, 570, 120, 24)
    1 point
  2. Hi, Try this Beta UDF to which I have added Hide/Show functions: And here is a quick example script to show it working: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include "Marquee_Mod.au3" $hGUI = GUICreate("Marquee Hide/Show", 320, 320) $iMarqueeIndex = _GUICtrlMarquee_Init() _GUICtrlMarquee_Create($iMarqueeIndex, "I can be hidden and reshown", 10, 10, 300, 20) $cButton_1 = GUICtrlCreateButton("Hide", 10, 220, 90, 90) $cButton_2 = GUICtrlCreateButton("Show", 110, 220, 100, 90) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cButton_1 _GUICtrlMarquee_Hide($iMarqueeIndex) Case $cButton_2 _GUICtrlMarquee_Show($iMarqueeIndex) EndSwitch WEnd M23
    1 point
  3. GtaSpider

    G15 LCD Remote

    Hi everyone. Anybody know: AutoIt can access to WinApi/GDI+. And so its possible to access to the LCD of the G15 Keyboard with the amazing DLL of Avatare-X. What it can do?: Shows every image file (bmp/jpeg/...)Write a Text on LCDColorize Pixel as u wantCreate a RectControl the Buttons under the LCD...How to Run: First dezip the Zipfile and then run the "installLogLcd.bat" wich installing the Object u need. Then start one of these two Examples. There are two examples in the Zip. The first shows simple some functions of the UDF. The Second shows, how u can create more then 1 Object on the LCD (e.g a text and a rect and a other text and ....) I hope u like it, and it would be great, if you give me some back comments Mfg / Best Regards Spider Edit: Now comments and MsgBoxes in english AvLCD_up1.1___EN.zip
    1 point
  4. Danyfirex

    dllcall how to use

    Local $aResult = DllCall ($DllPath&"mt4gui2.dll","wstr","guiVersion") Saludos
    1 point
  5. Hey Guys. In GUICtrlSetOnEvent help page we can read: It seems, it doesn't work in 3.3.14.5 or am I doing something wrong? ; unbound code(...) GUICtrlCreateGroup("Hotkeys settings", 10, 220, 580, 90) GUICtrlSetFont(-1, 8.5, 400) GUICtrlCreateLabel("Number of registered Hotkeys:", 20, 240) $idNumHotkeys = GUICtrlCreateLabel(UBound($g_aHotkeys), 400, 240) GUICtrlCreateLabel("HotKeys:", 20, 270) Local $aHots[UBound($g_aHotkeys)] For $i = 0 To UBound($g_aHotkeys) -1 $aHots[$i] = $g_aHotkeys[$i][0] Next $idHotkeys = GUICtrlCreateCombo("", 160, 270, 270, 0, $CBS_DROPDOWNLIST) GUICtrlSetData(-1, _ArrayToString($aHots)) ; $idHotkeyDelete = GUICtrlCreateButton("", 450, 268, 30, 30, 0x0040) GUICtrlSetImage(-1, $g_sFilePath & "icon-delete.ico") GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetTip(-1, "----------" & @CRLF & "Remove selected Hotkey", "REMOVE") $idHotkeySuspend = GUICtrlCreateButton("", 480, 268, 30, 30, 0x0040) GUICtrlSetImage(-1, $g_sFilePath & "icon-pause.ico") GUICtrlSetState(-1, $GUI_DISABLE) ; GUICtrlSetFont(-1, 12, 800, 0, "Segoe UI Symbol") GUICtrlSetTip(-1, "-----------" & @CRLF & "Pause selected Hotkey until the next script reload", "SUSPEND") $idHotkeyEdit = GUICtrlCreateButton("", 510, 268, 30, 30, 0x0040) GUICtrlSetImage(-1, $g_sFilePath & "icon-edit.ico") GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetTip(-1, "-----------" & @CRLF & "Edit Selected Hotkey", "EDIT") $idHotkeyAdd = GUICtrlCreateButton("", 540, 268, 30, 30, 0x0040) GUICtrlSetImage(-1,$g_sFilePath & "icon-add4.ico") GUICtrlSetTip(-1, "-----------" & @CRLF & "Opens GUI for creating new Hotkey", "ADD NEW Hotkey") ; Unbound Code (...) GUICtrlSetOnEvent($idHotkeys, "enableButtons") ; Unbound Code (...) Func enableButtons() $i = @GUI_CtrlId GUICtrlSetOnEvent($i, "") $i+=1 While BitAnd(GUICtrlGetState($i), $GUI_DISABLE) GUICtrlSetState($i, $GUI_ENABLE) $i += 1 WEnd EndFunc It can be bypassed by something like: ; Unbound code (...) GUICtrlSetOnEvent($i, "Blank") ; Unbound code (...) Func Blank() ; Do Nothing EndFunc But I wonder: Have I understood help incorrectly and it is about something else (then about what?) Did I do something wrong? It's something that was planned but not yet implemented (such as Maps) It's just a mistake in help file In case 3 or 4 is correct, it would be good to remove that information from Help File, because it may be confusing
    1 point
  6. If you try to make a sample with IUIAutomation: look my signature. We gonna help you.
    1 point
  7. This _PixelsInLineToArray function will calculate the "x" or "y" value from the equation of a straight line of two points. Example:- If the two points are pt1(10,10) and pt2(13, 30) then the "y" values are used to calculate the 21 "x" values. (The difference in "y" values is greater than the difference in "x" values.) This will return 21 x, y, and pixel colours in the array. If the "x" values were used, there would only be 4 calculations made from 10 to 13, which would return a 4 element array. #include <Array.au3> #include <WinAPIGdi.au3> ; Using $scale in position calculations is sometimes necessary when, under the system's ; "Display" settings, the "Scale and layout" parameter is not 100%. ; When the "Scale and layout" parameter is 100%, this $scale value = 1. Global $scale = _WinAPI_EnumDisplaySettings('', $ENUM_CURRENT_SETTINGS)[0] / @DesktopWidth Local $Pt1[2] = [52, 28] Local $Pt2[2] = [50, 60] _ArrayDisplay(_PixelsInLineToArray($Pt1[0], $Pt1[1], $Pt2[0], $Pt2[1])) ; Parameters:- ; $Pt1X, $Pt1Y - are the x and y coordinates of point 1 ; $Pt2X, $Pt2Y - are the x and y coordinates of point 2 ; Returns: A 2D array:- ; $aArray[0] contains the X coordinate of the pixel ; $aArray[1] contains the Y coordinate of the pixel ; $aArray[3] contains the colour of the pixel in 0xRRGGBB 24bit hex. colour format. (This is what PixelGetColor returns) ; Where, "RR" (0-255) Red channel, "GG" (0-255) Green channel, "BB" (0-255) Blue channel. ; For 32bit GDIPlus hex colour format is 0xAARRGGBB. Where. "AA" (0-255) is Alpha channel (transparency). ; Examples of 0xRRGGBB 24bit hex. colour format:- 0xFFFFFF is white, 0x000000 is black, 0xFF0000 is red, 0x00FF00 is green. ; Func _PixelsInLineToArray($Pt1X, $Pt1Y, $Pt2X, $Pt2Y) If Abs($Pt1X - $Pt2X) > Abs($Pt1Y - $Pt2Y) Then If $Pt1X > $Pt2X Then ; If Abs($Pt1X - $Pt2X) has the greater distance, make Point 2 "x" value have the larger value. Local $TempX, $TempY $TempX = $Pt1X $TempY = $Pt1Y $Pt1X = $Pt2X $Pt1Y = $Pt2Y $Pt2X = $TempX $Pt2Y = $TempY EndIf $m = ($Pt2Y - $Pt1Y) / ($Pt2X - $Pt1X) ; line's gradient ; y - y1 = $m(x - x1) ; Equation for a straight line Local $aArray[($Pt2X - $Pt1X) + 1][3] For $x = $Pt1X To $Pt2X ; Note: $Pt2X has a greater value than $Pt1X. $aArray[$x - $Pt1X][0] = $x $aArray[$x - $Pt1X][1] = Round(($m * $x) - ($m * $Pt1X) + $Pt1Y, 0) ; y = $m(x - x1) + y1 (y value from equation for a straight line) $aArray[$x - $Pt1X][2] = "0x" & Hex(PixelGetColor($aArray[$x - $Pt1X][0] * $scale, $aArray[$x - $Pt1X][1] * $scale), 6) Next Return $aArray Else If $Pt1Y > $Pt2Y Then ; If Abs($Pt1Y - $Pt2Y) has the greater distance, make Point 2 "y" value have the larger value. Local $TempX, $TempY $TempX = $Pt1X $TempY = $Pt1Y $Pt1X = $Pt2X $Pt1Y = $Pt2Y $Pt2X = $TempX $Pt2Y = $TempY EndIf $m = ($Pt2Y - $Pt1Y) / ($Pt2X - $Pt1X) ; line's gradient Local $aArray[$Pt2Y - $Pt1Y + 1][3] For $y = $Pt1Y To $Pt2Y ; Note: $Pt2Y has a greater value than $Pt1Y $aArray[$y - $Pt1Y][0] = Round(($y / $m) - ($Pt1Y / $m) + $Pt1X, 0) ; x = (y - y1)/$m + x1 (x value from equation for a straight line) $aArray[$y - $Pt1Y][1] = $y $aArray[$y - $Pt1Y][2] = "0x" & Hex(PixelGetColor($aArray[$y - $Pt1Y][0] * $scale, $aArray[$y - $Pt1Y][1] * $scale), 6) Next Return $aArray EndIf EndFunc ;==>_PixelsInLineToArray
    1 point
  8. Aarstad, Which AutoIt release are you running (and which was running on the other machine you tried)? There were some bugs within 3.3.14.3 which affected the ScreenCapture UDF among others - so please make sure you are running the latest 3.3.14.5 release. M23
    1 point
×
×
  • Create New...