Jump to content

Recommended Posts

Posted

I want to get an effect like this:

ChangeScreenColor("left"-"green")

And it will do something like this:

Posted Image

Please help me...

Posted

  martin said:

How is the Mario screen mate related to what you want? If it is then it has not been obvious from what you've said so far. Even worse, when you saw that people were on the wrong track why didn't you say so?

I've seen a lot of replies in this thread but so far the person has has given the least information about what is needed seems to be you. It takes time answering questions and it looks like I am unable you help you because I have no idea what you want and your posts so far have been boardering on ridiculous. "bump" and "please help me" are not useful contributions.

Can't you do something like

1) I want to get an effect/image/ window.. like this.

2) This is what I've tried so far

3) the problem I get is this

I'm fed up with this thread, I'm not going to try helping here any more. You're even more annoying than qwertylol.

I'm done here too. Info, why don't you just read that fricken thread, it says so RIGHT THERE IN THAT POST. I'm done with this stupid topic.

We already tried to help you, and im not going to again.

Posted

I believe he wants to change the background to one color, then again to another color, since he has the hyphen

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Posted

That's What My Post Was For. Read the topic that geosoft said, right under the code, look whats there. :D

Posted (edited)

Well, I couldn't really understand his first post, but from his screenshot I came up with this. (This might just a be a shot in the dark)

; Function created by JustinReno
;$s_Color = 0(Red) 1(Green) 2(Blue)

#NoTrayIcon

HotKeySet("{ESC}", "_Quit")

_ColorScreenRegion(0, @DesktopHeight / 4, @DesktopWidth, @DesktopHeight / 2)

Func _ColorScreenRegion($i_Left, $i_Right, $i_Width, $i_Height, $s_Color = 2)
    Dim $s_Colors[2][3] = [[0, 1, 2], [0xFF0000, 0x00FF00, 0x0000CD]]
    $h_GUI = GUICreate("", $i_Width, $i_Height, $i_Left, $i_Right, 0x80000000)
    GUISetBkColor($s_Colors[1][$s_Colors[0][$s_Color]], $h_GUI)
    WinSetOnTop($h_GUI, Default, 1)
    GUISetState(@SW_SHOW, $h_GUI)
    While 1
        Sleep(100)
    WEnd
EndFunc

Func _Quit()
    Exit
EndFunc
Edited by JustinReno
Posted

So, He wants to change half the screen a color? :/

I'll write a function for this, only because im bored.

Posted

You could just exit the script, but it would be easy enough...

; Function created by JustinReno
;$s_Color = 0(Red) 1(Green) 2(Blue)

#NoTrayIcon

HotKeySet("{ESC}", "_CloseColorScreenRegion")

_ColorScreenRegion(0, @DesktopHeight / 4, @DesktopWidth, @DesktopHeight / 2)

Func _ColorScreenRegion($i_Left, $i_Right, $i_Width, $i_Height, $s_Color = 2)
    Dim $s_Colors[2][3] = [[0, 1, 2], [0xFF0000, 0x00FF00, 0x0000CD]]
    $h_GUI = GUICreate("", $i_Width, $i_Height, $i_Left, $i_Right, 0x80000000)
    GUISetBkColor($s_Colors[1][$s_Colors[0][$s_Color]], $h_GUI)
    WinSetOnTop($h_GUI, Default, 1)
    GUISetState(@SW_SHOW, $h_GUI)
    While 1
        Sleep(100)
    WEnd
EndFunc

Func _CloseColorScreenRegion()
    Dim $h_GUI
    GUIDelete($h_GUI)
EndFunc
Posted (edited)

How about this?

$Area, you can use: "left", "right", or "all" for right now.

$Color, is the color you want it.

Func _ChangeScreenColor($Area="All", $Color="0x000000")
    If $Area="All" Then
        $Area=@DesktopWidth&"x"&@DesktopHeight
        $Left=0
    ElseIf $Area="Left" Then
        $Area=@DesktopWidth/2&"x"&@DesktopHeight
        $Left=0
    ElseIf $Area="Right" Then
        $Area=@DesktopWidth/2&"x"&@DesktopHeight
        $Left=@DesktopWidth/2
    Else
        Return 0
    EndIf
    $Areas = StringSplit($Area, "x")
    $GUIHandle=GUICreate("", $Areas[1], $Areas[2], $Left, -1, 0x80000000+0x00040000)
    GUISetBkColor($Color, $GUIHandle)
    GUISetState()
    While 1
        Sleep(500)
    WEnd
EndFunc

Func _DeleteWindow()
GUIDelete($aGUI_Handle)
Endfunc
Edited by Swift
Posted

Ok, Some reason, I couldn't edit my other post, but I have some new code. Works flawlessly

$_Area

Either: "Left", "Right", "All"

$_Color

This Is The Hex Color Of Your Background.

$_AllowMovement

0= No movement

1= Movement

Func _ChangeScreenColor($_Area="All", $_Color="0x000000", $_AllowMovement=0)
    Switch $_Area
        Case "All"
            $Area=@DesktopWidth&"x"&@DesktopHeight
            $Left=0
        Case "left"
            $Area=@DesktopWidth/2&"x"&@DesktopHeight
            $Left=0
        Case "Right"
            $Area=@DesktopWidth/2&"x"&@DesktopHeight
            $Left=@DesktopWidth/2
        Case Else
            $Area=@DesktopWidth&"x"&@DesktopHeight
            $Left=0
    EndSwitch
    $Areas = StringSplit($Area, "x")
    If Not IsArray($Areas) Then
        SetError(2)
        Return 0
    EndIf
    Switch $_AllowMovement
        Case 0
            $GUIHandle=GUICreate("", $Areas[1], $Areas[2], $Left, -1, 0x80000000, 0x00000080)
            GUISetBkColor($_Color, $GUIHandle)
            GUISetState()
            While 1
                Sleep(500)
            WEnd
        Case 1
            $GUIHandle=GUICreate("", $Areas[1], $Areas[2], $Left, -1, 0x80000000+0x00040000, 0x00000080)
            GUISetBkColor($_Color, $GUIHandle)
            GUISetState()
            While 1
                Sleep(500)
            WEnd
        Case Else
            $GUIHandle=GUICreate("", $Areas[1], $Areas[2], $Left, -1, 0x80000000, 0x00000080)
            GUISetBkColor($_Color, $GUIHandle)
            GUISetState()
            While 1
                Sleep(500)
            WEnd
    EndSwitch
EndFunc
Posted

  Swift said:

Ok, Some reason, I couldn't edit my other post, but I have some new code. Works flawlessly

$_Area

Either: "Left", "Right", "All"

$_Color

This Is The Hex Color Of Your Background.

$_AllowMovement

0= No movement

1= Movement

Func _ChangeScreenColor($_Area="All", $_Color="0x000000", $_AllowMovement=0)
    Switch $_Area
        Case "All"
            $Area=@DesktopWidth&"x"&@DesktopHeight
            $Left=0
        Case "left"
            $Area=@DesktopWidth/2&"x"&@DesktopHeight
            $Left=0
        Case "Right"
            $Area=@DesktopWidth/2&"x"&@DesktopHeight
            $Left=@DesktopWidth/2
        Case Else
            $Area=@DesktopWidth&"x"&@DesktopHeight
            $Left=0
    EndSwitch
    $Areas = StringSplit($Area, "x")
    If Not IsArray($Areas) Then
        SetError(2)
        Return 0
    EndIf
    Switch $_AllowMovement
        Case 0
            $GUIHandle=GUICreate("", $Areas[1], $Areas[2], $Left, -1, 0x80000000, 0x00000080)
            GUISetBkColor($_Color, $GUIHandle)
            GUISetState()
            While 1
                Sleep(500)
            WEnd
        Case 1
            $GUIHandle=GUICreate("", $Areas[1], $Areas[2], $Left, -1, 0x80000000+0x00040000, 0x00000080)
            GUISetBkColor($_Color, $GUIHandle)
            GUISetState()
            While 1
                Sleep(500)
            WEnd
        Case Else
            $GUIHandle=GUICreate("", $Areas[1], $Areas[2], $Left, -1, 0x80000000, 0x00000080)
            GUISetBkColor($_Color, $GUIHandle)
            GUISetState()
            While 1
                Sleep(500)
            WEnd
    EndSwitch
EndFunc
Just what I wanted :D

Is there a way to make it hide the toolbar too?

Posted

the icon tray? or the whole start button - the right side? in that case, I think winsetontop wil do, or else, just close explorer.exe

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Posted

I ment the taskbar - the place with the 'Start' button and windows list...

I'm not that good in english so please forgive me my lords... O_o

Posted

HotKeySet ( "{Esc}", "Quit")
Func Quit()
    Exit
EndFunc

Func _ChangeScreenColor($_Area="All", $_Color="0x000000", $_AllowMovement=0)
    Switch $_Area
        Case "All"
            $Area=@DesktopWidth&"x"&@DesktopHeight
            $Left=0
        Case "left"
            $Area=@DesktopWidth/2&"x"&@DesktopHeight
            $Left=0
        Case "Right"
            $Area=@DesktopWidth/2&"x"&@DesktopHeight
            $Left=@DesktopWidth/2
        Case Else
            $Area=@DesktopWidth&"x"&@DesktopHeight
            $Left=0
    EndSwitch
    $Areas = StringSplit($Area, "x")
    If Not IsArray($Areas) Then
        SetError(2)
        Return 0
    EndIf
    Switch $_AllowMovement
        Case 0
            $GUIHandle=GUICreate("", $Areas[1], $Areas[2]+100, $Left, -1, 0x80000000, 0x00000080)
            GUISetBkColor($_Color, $GUIHandle)
            WinSetOnTop($GUIHandle, Default, 1)
            GUISetState()
            While 1
                Sleep(500)
            WEnd
        Case 1
            $GUIHandle=GUICreate("", $Areas[1], $Areas[2]+100, $Left, -1, 0x80000000+0x00040000, 0x00000080)
            GUISetBkColor($_Color, $GUIHandle)
            WinSetOnTop($GUIHandle, Default, 1)
            GUISetState()
            While 1
                Sleep(500)
            WEnd
        Case Else
            $GUIHandle=GUICreate("", $Areas[1], $Areas[2]+100, $Left, -1, 0x80000000, 0x00000080)
            GUISetBkColor($_Color, $GUIHandle)
            WinSetOnTop($GUIHandle, Default, 0)
            GUISetState()
            While 1
                Sleep(500)
            WEnd
    EndSwitch
EndFunc

_ChangeScreenColor ("all", "0xff00000", 0)
Sleep ( 100 )
MsgBox ( 0, "Problem...", ":(")

Why the script doesn't continue to the next line?

:D

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...