Jump to content

plase help the newbie member

Recommended Posts


my problem is...

If WinExists(\\\"Bucket\\\") Then
    MsgBox(0, \\\"Thius website is not allowed\\\", \\\"Restrictions Found\\\")

this will detect and close a window with a message.

now i want to change the colour of text in message.

i am totally a newbie so dont know what to do and where to start.

i want to change the text colour of message box to Red.

and also want to know how to change to other colours.

anyone please help me.

Edited by GsmExpert
Link to comment
Share on other sites

ok problem solved

Func ColorTextBox($title,$text,$color)
    Local $L_TEXT = StringLen($text)
    Local $ROW = Int(Number($L_TEXT) / 45) + 1
    Local $GUI = GUICreate($title,300,15*Number($ROW) + 30,-1,-1)
    Local $FIELD = GUICtrlCreateLabel($text,5,5,290,15*Number($ROW),0x01)
    Local $OK = GUICtrlCreateButton("OK",130,15*Number($ROW) + 5,40,20)
    GUICtrlSetColor ($FIELD,$color)
    While 1
        Local $MSG = GUIGetMsg()
        If $MSG = $OK Then
$MESSAGE = "AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI.  It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys)."
If WinExists("MyWindowTitle") Then
    ColorTextBox("Test colors",$MESSAGE,0xFF0000)

Thanks to Ahsan and Andreik for help!

Edited by GsmExpert
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

  • Recently Browsing   0 members

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