Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/08/2012 in all areas

  1. Yashied

    ColorChooser UDF

    LAST VERSION - 1.1 07-Dec-10 This library provides a dialog box to select a color in three color models - RGB (Red, Green, Blue), HSL (Hue, Saturation, Lightness), and HSB (Hue, Saturation, Brightness). This is not a program, this is a function that you can use in your scripts. This function is similar to the _ChooseColor() from Misc UDF library that is included in the AutoIt package. UDF is fully compatible with ColorPicker UDF (v1.5) and can be used as a custom function for a Color Chooser dialog box (see examples). Also there is a tool (pipette) to get the color from the screen. I recommend to first read description inside the library. Please play with this UDF and post any comments and suggestions. ColorChooser UDF Library v1.1 Previous downloads: 316 ColorChooser.au3 Example1 #Include <ColorChooser.au3> Opt('MustDeclareVars', 1) Global $hForm, $Msg, $Label, $Button, $Data, $Color = 0x50CA1B $hForm = GUICreate('MyGUI', 170, 200) $Label = GUICtrlCreateLabel('', 15, 15, 140, 140, $SS_SUNKEN) GUICtrlSetBkColor(-1, $Color) $Button = GUICtrlCreateButton('Select color...', 35, 166, 100, 23) GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE ExitLoop Case $Button $Data = _ColorChooserDialog($Color, $hForm) If $Data > -1 Then GUICtrlSetBkColor($Label, $Data) $Color = $Data EndIf EndSwitch WEnd Example2 (required ColorPicker UDF) #Include <ColorChooser.au3> #Include <ColorPicker.au3> Opt('MustDeclareVars', 1) Global $hForm, $Msg, $Label, $Picker $hForm = GUICreate('MyGUI', 170, 200) $Label = GUICtrlCreateLabel('', 15, 15, 140, 140, $SS_SUNKEN) GUICtrlSetBkColor(-1, 0x50CA1B) $Picker = _GUIColorPicker_Create('', 55, 166, 60, 23, 0x50CA1B, BitOR($CP_FLAG_CHOOSERBUTTON, $CP_FLAG_MAGNIFICATION, $CP_FLAG_ARROWSTYLE), 0, -1, -1, 0, 'Simple Text', 'Custom...', '_ColorChooserDialog') GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE ExitLoop Case $Picker GUICtrlSetBkColor($Label, _GUIColorPicker_GetColor($Picker)) EndSwitch WEnd
    1 point
  2. You claim you are going to make a living "developing full on software" yet you feel the need to ask us which language is better for a non-specific task? I think on a scale of one to ready to make a living you are somewhere around chickens.
    1 point
  3. Also I think you're missing GUICtrlRead. Your code is massive and badly formatted still that it's hard to correct without doing a massive re-write.
    1 point
  4. The error spells it out pretty good you are defining the function twice. You only need to define the function once. NOTE: I am not sure that my verbage is correct with "Defining", but the point is, only put it in there once. Most of us put our functions at the end of our scripts.
    1 point
  5. Wow. Let me answer that: Fuck You.
    1 point
  6. Is there a way of detecting the current display resolution and have autoit save it so that i can revert back to it at a later point in the script You could use these macros: @DesktopHeight Height of the desktop screen in pixels. (vertical resolution) @DesktopWidth Width of the desktop screen in pixels. (horizontal resolution) @DesktopDepth Depth of the desktop screen in bits per pixel. @DesktopRefresh Refresh rate of the desktop screen in hertz. and save the values in an ini file. IniDelete Deletes a value from a standard format .ini file. IniRead Reads a value from a standard format .ini file. iniReadSection Reads all key/value pairs from a section in a standard format .ini file. IniReadSectionNames Reads all sections in a standard format .ini file. IniRenameSection Renames a section in a standard format .ini file. IniWrite Writes a value to a standard format .ini file. IniWriteSection Writes a section to a standard format .ini file. William
    1 point
  7. Try clicking it by ID, but it might well be none of these methods will work correctly due to the onclick and onmousedown events. $oSubmit = _IEGetObjById($oIE, "appLink_0") _IEAction($oSubmit, "click")
    1 point
  8. It may be a significant detail but it doesn't change anything. Spend 3 seconds thinking about the problem and a solution presents itself.
    1 point
  9. ImNotVeryCleverOrICouldHaveThoughtUpThisOnMyOwn("This goes to stdout." & @CRLF) SetError(1) ; Force an error value. ImNotVeryCleverOrICouldHaveThoughtUpThisOnMyOwn("This goes to stderr." & @CRLF) Func ImNotVeryCleverOrICouldHaveThoughtUpThisOnMyOwn($sMsg, $iError = @error) If $iError Then ConsoleWriteError("STDERR: " & $sMsg) Else ConsoleWrite("STDOUT: " & $sMsg) EndIf EndFunc 30 seconds.
    1 point
  10. Valik

    Small application's?

    Start SciTE. Click "Help" on the menu bar.Click "Help" in Help submenu.???Profit.
    1 point
×
×
  • Create New...