Jump to content

_ChooseColor


Bert
 Share

Recommended Posts

I tried to run the example script that is included in the Autoit Beta:

include <Misc.au3>

Local $color

$color = _ChooseColor (0)
If (@error) Then
   MsgBox(0, "", "Error _ChooseColor: " & @error)
Else
   MsgBox(0,"_ChooseColor","COLORREF rgbColors: " & $color)
EndIf

$color = _ChooseColor (1)
If (@error) Then
   MsgBox(0, "", "Error _ChooseColor: " & @error)
Else
   MsgBox(0,"_ChooseColor","Hex BGR Color: " & $color)
EndIf

$color = _ChooseColor (2, 255); default color selected using COLORREF rgbcolor
If (@error) Then
   MsgBox(0, "", "Error _ChooseColor: " & @error)
Else
   MsgBox(0,"_ChooseColor","Hex RGB Color: " & $color)
EndIf

$color = _ChooseColor (2, 0x0000FF, 1); default color selected using BGR hex value
If (@error) Then
   MsgBox(0, "", "Error _ChooseColor: " & @error)
Else
   MsgBox(0,"_ChooseColor","Hex RGB Color: " & $color)
EndIf

$color = _ChooseColor (2, 0xFF0000, 2); default color selected using RGB hex value
If (@error) Then
   MsgBox(0, "", "Error _ChooseColor: " & @error)
Else
   MsgBox(0,"_ChooseColor","Hex RGB Color: " & $color)
EndIf

I get a error on line 5. It says _ChooseColor is a unknown function. The version of Autoit I run is 3.1.1.91

Any thoughts?

Link to comment
Share on other sites

#include <Misc.au3>

MsgBox(0,"Version",@AutoItVersion)
Local $color

$color = _ChooseColor (0)
If (@error) Then
   MsgBox(0, "", "Error _ChooseColor: " & @error)
Else
   MsgBox(0,"_ChooseColor","COLORREF rgbColors: " & $color)
EndIf

$color = _ChooseColor (1)
If (@error) Then
   MsgBox(0, "", "Error _ChooseColor: " & @error)
Else
   MsgBox(0,"_ChooseColor","Hex BGR Color: " & $color)
EndIf

$color = _ChooseColor (2, 255); default color selected using COLORREF rgbcolor
If (@error) Then
   MsgBox(0, "", "Error _ChooseColor: " & @error)
Else
   MsgBox(0,"_ChooseColor","Hex RGB Color: " & $color)
EndIf

$color = _ChooseColor (2, 0x0000FF, 1); default color selected using BGR hex value
If (@error) Then
   MsgBox(0, "", "Error _ChooseColor: " & @error)
Else
   MsgBox(0,"_ChooseColor","Hex RGB Color: " & $color)
EndIf

$color = _ChooseColor (2, 0xFF0000, 2); default color selected using RGB hex value
If (@error) Then
   MsgBox(0, "", "Error _ChooseColor: " & @error)
Else
   MsgBox(0,"_ChooseColor","Hex RGB Color: " & $color)
EndIf

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...