Sign in to follow this  
Followers 0
James

Status Bar

15 posts in this topic

Well, I was thinking of this earlier.

Basically, when a button is pressed or something, the status bar tells you what is happening.

;------------------------------------------------
;
; Name: Toolbar example
; Author: Secure_ICT
; Description: Changes the toolbar text
; Credit: 
; Version: n/a
;
;-----------------------------------------------

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$window = GUICreate("Status Bar", 236, 177, 193, 115)
$data = GUICtrlCreateInput("", 0, 152, 233, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
$open = GUICtrlCreateButton("Open", 64, 16, 113, 57, 0)
$close = GUICtrlCreateButton("Close", 64, 80, 113, 57, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $open
            GUICtrlSetData($data, "Open the CD/DVD drive")
            CDTray("E:", "open")
        Case $close
            GUICtrlSetData($data, "Close the CD/DVD drive")
            CDTray("E:", "close")
    EndSwitch
WEnd

Secure

Share this post


Link to post
Share on other sites



Not very useful.. I guess it's an experiment.

Kurt


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

;------------------------------------------------
;
; Name: WinTitle example
; Author: Secure_ICT
; Description: Changes the WinTitle
; Credit: 
; Version: n/a
;
;-----------------------------------------------

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$window = GUICreate("", 236, 177, 193, 115)
$open = GUICtrlCreateButton("Open", 64, 16, 113, 57, 0)
$close = GUICtrlCreateButton("Close", 64, 80, 113, 57, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $open
            WinSetTitle("", "", "Open the CD/DVD drive")
            CDTray("E:", "open")
        Case $close
            WinSetTitle("", "", "Close the CD/DVD drive")
            CDTray("E:", "close")
    EndSwitch
WEnd

Just a quick one. It changes the wintitle to the text instead.

Share this post


Link to post
Share on other sites

Well, I was thinking of this earlier.

Basically, when a button is pressed or something, the status bar tells you what is happening.

;------------------------------------------------
;
; Name: Toolbar example
; Author: Secure_ICT
; Description: Changes the toolbar text
; Credit: 
; Version: n/a
;
;-----------------------------------------------

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$window = GUICreate("Status Bar", 236, 177, 193, 115)
$data = GUICtrlCreateInput("", 0, 152, 233, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
$open = GUICtrlCreateButton("Open", 64, 16, 113, 57, 0)
$close = GUICtrlCreateButton("Close", 64, 80, 113, 57, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $open
            GUICtrlSetData($data, "Open the CD/DVD drive")
            CDTray("E:", "open")
        Case $close
            GUICtrlSetData($data, "Close the CD/DVD drive")
            CDTray("E:", "close")
    EndSwitch
WEnd

Secure

Why not use a real statusbar?

_GuiCtrlStatusBarCreate etc... look in the UDFs of the help


SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to post
Share on other sites

um dude theres no point in posting scripts that just use a simple GUICtrlSetData... and WinSetTitle , well thatll set the current window active what if ur script isnt the current window cuz they clicked the button then switched to something else quickly...., just please i beg of you in the kindest way stop making pointless topics

Share this post


Link to post
Share on other sites

experiment but don't post it, you've showed how to change a window title.... congrats thats in the help file no need to waste peoples time posting this useless topic about how to change a window title, or Guictrlsetdata to change an input box

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

experiment but don't post it, you've showed how to change a window title.... congrats thats in the help file no need to waste peoples time posting this useless topic about how to change a window title, or Guictrlsetdata to change an input box

Dude your a freaking cocky, and arrogant asshole!

this forum is for others to share their scripts regardless of how useful they may be.

[Edit]

You're signature, avator and name says it all, "Anything you write is best written with the delete key" suggest you take your own word for it.. :P

Edited by BreakAzoid

Share this post


Link to post
Share on other sites

Dude your a freaking cocky, and arrogant asshole!

this forum is for others to share their scripts regardless of how useful they may be.

[Edit]

You're signature, avator and name says it all, "Anything you write is best written with the delete key" suggest you take your own word for it.. :P

You've been a part of this forum for all of 45 minutes... maybe you should take your own advice and shut your pie hole, and leave others to take care of themselves or a Mod to do it for them.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Sorry I'm new too but I registered just to say that I have learned some bits fro mthis script. :P

Share this post


Link to post
Share on other sites

im using general status bar ..

;; statusbar

Global $aStatusParts[2] = [420, -1]

Global $aTempStatus[2] = ["", ""]

$StatusBar = _GUICtrlStatusBarCreate($main, $aStatusParts, $aTempStatus, $SBARS_SIZEGRIP)

_GUICtrlStatusBarSetMinHeight($StatusBar, 20)

_GUICtrlStatusBarSetText($StatusBar, "....");

works nicely

Share this post


Link to post
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
Sign in to follow this  
Followers 0