Jump to content

titlebar


Recommended Posts

I have a timer script and i want it will show on titlebar but when i set titlebar its not completely show on title bar is this possible?

i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================>

Link to comment
Share on other sites

I love this quote, thought you might like it too.

Q18. Why isn't my thread getting any replies?

A2. Did you post example code? If you have not posted an example of the code you are having an issue with, then you will not recieve support. When posting a non-working script, please do so in the smallest amount of stand-alone code possible. If the code you post cannot run by itself on another person's computer, they will not be able to recreate the issue.

I'm not sure why you say it is not completely show[ing up] on the title bar. Here's an example of putting the date and time completely in the titlebar. Sharing the problem code with us would be helpful, unless you don't want help and really didn't mean to make this post. :)

#include <date.au3>
MsgBox(0, _now(), "Is this what you wanted?")

Edit: that quote is from the FAQ Forum sticky message. Might make sense to see what other questions are answered in there.

Edited by ssubirias3
Link to comment
Share on other sites

@JamesB - thanks for sharing your neat little script. I haven't played with the other versions yet, but look forward to doing so. I'm going to guess you suggested for the op to study and see how you used an array to position the input box on the title bar. I don't think you meant your complete script would fix his problem. They will have to still do some work, right? The other caution point I see that's important to mention is the input box will say "ontop" of other windows as long as notpad's window is active.

I'll add your script to my growing collection of scripts to dissect and learn from :).

Link to comment
Share on other sites

thanx for all of you. u could never completely understand wat i am saying...,

here i put my codes.,

#include <GUIConstants.au3>
#include <Misc.au3>


hotkeyset("6", "khurram")

Const $WM_SYSCOMMAND = 0x0112
;Const $SC_MOVE = 0xF010
Const $SC_MINIMIZE = 0xF020

$gui = GUICreate("Coins: ", 641, 0, 0, 450, BitOR($WS_SYSMENU,$WS_CAPTION))
GUISetState(@SW_SHOW)
WinSetOnTop($gui, "", 1)

Func On_WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam)
    If BitAND($wParam, 0xFFF0) = $SC_MINIMIZE Then Return
EndFunc

Sleep(100)
    Send("6")
While 1
    
WEnd

Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam)
    If $hWnd = $testGUI2 And $iMsg = $WM_NCHITTEST Then
        $id = _API_DefWindowProc($hWnd, $iMsg, $iwParam, $ilParam)
        If $id = 2 Then;if it is the title handle
            Return 1;return the client handle
        Else
            Return $id;return the real handle
        EndIf
    EndIf

EndFunc


Func _API_DefWindowProc($hWnd, $iMsg, $iwParam, $ilParam)
    Local $aResult

    $aResult = DllCall("User32.dll", "int", "DefWindowProc", "hwnd", $hWnd, "int", $iMsg, "int", $iwParam, "int", $ilParam)
    Return $aResult[0]
EndFunc

Func ALabel1Click()

EndFunc




Func khurram()
    $pid = ProcessExists("closer.exe")
    if $pid then
        Processclose($pid)
    EndIf
    $Minutes = 5 ; will wait 1 minutes
Local $60Count = 0, $begin = TimerInit()
While $Minutes > $60Count
   
    $dif = TimerDiff($begin)
    $dif2 = StringLeft($dif, StringInStr($dif, ".") -1)
    $Count = int($dif/1000)
    $60Count = Int($Count / 60)
    WinSetTitle("Coins", "", $count & @CRLF & ":" & $60count & @CRLF)
   if $60count = 5 Then
       Run("closer.exe")
       EndIf
    Sleep(20)
    WEnd
EndFunc

i want this time run on titlebar of gui. its a countdown timer of 5 minutes.

i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================>

Link to comment
Share on other sites

... and next its not working.

What does that mean? Are you saying that the Title is not at all changing from "Coins" to "Coins: " or are you saying that it does work but its not showing the count down effect you're after? In order to give the appearance of a countdown in anything you need to loop otherwise the script has completed its task successfully. Consider the example code for ProgressOn() from the Help file
ProgressOn("Progress Meter", "Increments every second", "0 percent")
For $i = 10 to 100 step 10
    sleep(1000)
    ProgressSet( $i, $i & " percent")
Next
ProgressSet(100 , "Done", "Complete")
sleep(500)
ProgressOff()

The only reason that "LOOKS" like its changing is because of the loop. Hope that helps and please don't say something is not working, try to understand why its not turning out like you want it. :)

Edited by ssubirias3
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...