Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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.

 

Posted

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

Posted

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

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
  • Moderators
Posted

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.

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.

  • 2 weeks later...
Posted

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

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