Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/21/2020 in all areas

  1. UDF to control FireFox via MozRepl: FF_V0.6.0.1b-15_au3 Change Log: Original thread: http://www.autoitscript.com/forum/topic/95595-ffau3-v0601b-10/
    1 point
  2. Hello. I have designed and created a simple Clipboard manager in AutoIt. The project is open for any ideas, I hope you found it useful (and if you did please like my post so I can continue making software). Features [Done] Can store data in up to 5 slots. [Done] Options form. [Done] System Tray menu. [Done] Supports Hot-keys when pasting/copying data. [Done] Ability to copy and store text. [Done] Clipper theme. [Coming soon] Ability to copy and store files and folders. [Coming soon] Clipboard history form. ( currently logs history into a text file ) And Much Much More! Source Conclusion If you find any bugs or you have any ideas you are free to leave them here. Please give this script a try because it took time. If you enjoyed this script PLEASE smash the like button, Thanks! ALSO: Have any script ideas? Please share them with me because I will make them! Clipper.au3
    1 point
  3. ChroPath makes it simple to determine correct selector for any element.
    1 point
  4. @Wingens why are you reinventing the wheel, rather than using Remote Desktop Connection Manager? Then, if you need to add features you can just automate the RDCM.
    1 point
  5. This was an oversight in my patching of the CryptoNG lib; fixed in v3.3c, available for download now.
    1 point
  6. Func GUIStaticCtrlGetBkColor($hWnd) If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd) Local $hWnd_Main = _WinAPI_GetParent ($hWnd) Local $hDC = _WinAPI_GetDC($hWnd) Local $hBrush = _SendMessage($hWnd_Main, $WM_CTLCOLORSTATIC, $hdc, $hWnd) Local $iColor = _GetBrushColor($hBrush) _WinAPI_ReleaseDC($hWnd, $hDC) Return $iColor EndFunc Here is @guinness' GUICtrlGetBkColor converted to use GetBrushColor()
    1 point
  7. If you set the Label background colour with GUICtrlSetBkColor() and happen to forget the colour you set it as, then why not try GUICtrlGetBkColor() Function: #include-once #include <WinAPIGdi.au3> ; #FUNCTION# ==================================================================================================================== ; Name ..........: GUICtrlGetBkColor ; Description ...: Retrieves the RGB value of the control background. ; Syntax ........: GUICtrlGetBkColor($hWnd) ; Parameters ....: $hWnd - Control ID/Handle to the control ; Return values .: Success - RGB value ; Failure - 0 ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func GUICtrlGetBkColor($hWnd) If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd) EndIf Local $hDC = _WinAPI_GetDC($hWnd) Local $iColor = _WinAPI_GetPixel($hDC, 0, 0) _WinAPI_ReleaseDC($hWnd, $hDC) Return $iColor EndFunc ;==>GUICtrlGetBkColorExample use of Function: #include <MsgBoxConstants.au3> #include 'GUICtrlGetBkColor.au3' Example() Func Example() Local $hGUI = GUICreate('GUICtrlGetBkColor() Example', 500, 350) Local $iLabel = GUICtrlCreateLabel('', 10, 10, 480, 330) GUISetState(@SW_SHOW, $hGUI) Local $aColor = [0x0000FF, 0x8FFF9F, 0xEC4841, 0xB0E35D, 0x440BFD] ; Random colour array. Local $iColor = 0 For $i = 0 To UBound($aColor) - 1 GUICtrlSetBkColor($iLabel, $aColor[$i]) Sleep(20) $iColor = GUICtrlGetBkColor($iLabel) ; Pass the controldid to the function. MsgBox($MB_SYSTEMMODAL, '', 'Background Color: ' & _ConvertToHexFormat($aColor[$i]) & @CRLF & _ 'GUICtrlGetBkColor() Hex Format: ' & _ConvertToHexFormat($iColor) & @CRLF & _ 'GUICtrlGetBkColor() Returned: ' & $iColor, 0, $hGUI) Next GUIDelete($hGUI) EndFunc ;==>Example Func _ConvertToHexFormat($iColor) Return Hex($iColor, 6) EndFunc ;==>_ConvertToHexFormatAdditional thanks to Yashied for pointing out the obvious in this >forum message about _WinAPI_GetPixel() and the hint about returning a RGB number
    1 point
  8. I believe the better way to do all of this would be to get the hdc for the control and send the proper message to have the winproc send you the hBrush for the background Something like this (for static controls at least) Func GUICtrlGetBkColor($hWnd) If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd) Local $hWnd_Main = _WinAPI_GetParent ($hWnd) Local $hDC = _WinAPI_GetDC($hWnd) Local $hBrush = _SendMessage($hWndMain, $WM_CTLCOLORSTATIC, $hdc, $hWnd) Local $iColor = _GetBrushColor($hBrush) _WinAPI_ReleaseDC($hWnd, $hDC) Return $iColor EndFunc
    1 point
  9. Notes: Simple, but I find this extremely useful. Hotkeys: Ctrl + Home (Clear the clipboard)Ctrl + Page Up (Read the clipboard)Ctrl + End (Exit the program)ToDo: Load File Into Clipboard With Hotkey.Your Suggestions!#cs ---------------------------------------------------------------------------- Author: -> Final Version Version: -> 3.3.5.6 <Beta> Function: -> Simple clipboard tool, but could potentially but useful for nurmerous people.s #ce ---------------------------------------------------------------------------- #include <Misc.au3> Opt("TrayMenuMode", 3) $tClear = TrayCreateItem("-> Clear The Clipboard") $tRead = TrayCreateItem("-> Read The Clipboard") $tExit = TrayCreateItem("-> Exit Program") While 1 $tMsg = TrayGetMsg() Select Case $tMsg = $tClear ClearTheClip() Case $tMsg = $tRead ReadTheClip() Case $tMsg = $tExit End() EndSelect If _IsPressed("11") And _IsPressed("24") Then ClearTheClip() ElseIf _IsPressed("11") And _IsPressed("21") Then ReadTheClip() ElseIf _IsPressed("11") And _IsPressed("23") Then End() EndIf WEnd Func ClearTheClip() ClipPut(""); EndFunc ;==>ClearTheClip Func ReadTheClip() $sRead = ClipGet(); If $sRead = "" Then TrayTip("Current Clip Contents", "Clipboard doesn't contain anything!", 3, 1); ElseIf $sRead = " " Then ;==> This is for my personal use, I got into the habit of clearing my clipboard by cutting a space in a text field. TrayTip("Current Clip Contents", "Clipboard contained a space, I'll empty it for you...", 3, 1); ClipPut("") Else TrayTip("Current Clip Contents", $sRead, 3, 1); EndIf EndFunc ;==>ReadTheClip Func End() Exit EndFunc ;==>End
    1 point
×
×
  • Create New...