Jump to content

Recommended Posts

Posted

In lots of programs in any languages you see guis showing the status for example(I created this in photoshop it is just an example.)

Posted Image

Is there a function like this in autoit that I'm missing?

Posted

I guess I'll try to explain it in a different way. Say I'm making an MIRC script that auto logs in and looks for a scrim(I assure this is not 'botting' this is automation if you don't believe me figure out what MIRC is) I want to make a statusbox on the right of MIRC Showing whats happening. Using message boxes looks completely unprofessional(I'm not looking for professionalism complete but message boxes just look terrible).

Posted

Create a GUI.. Update the labels with the status by using guictrlsetdata(), to show the % loading..

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
Posted

Use this:

#include <GUIConstants.au3>
global $i=0

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 237, 194, 193, 125)
$Label1 = GUICtrlCreateLabel("", 157, 168, 30, 17)
$Label2 = GUICtrlCreateLabel("File1.doc", 24, 72, 47, 17)
$Label3 = GUICtrlCreateLabel("File2.doc", 24, 96, 47, 17)
$Label4 = GUICtrlCreateLabel("File3.doc", 24, 120, 47, 17)
$Label5 = GUICtrlCreateLabel("", 157, 72, 30, 17)
$Label6 = GUICtrlCreateLabel("", 157, 96, 30,17)
$Label7 = GUICtrlCreateLabel("", 157, 120, 30,17)
$Label8 = GUICtrlCreateLabel("", 157, 144,30,17)
$Label9 = GUICtrlCreateLabel("File5.doc", 24, 168, 44, 17)
$Label10 = GUICtrlCreateLabel("File4.doc", 24, 144, 47, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
AdlibEnable("incr",250)
While 1
    If GUICtrlRead($label1) <> $i&"%" Then GUICtrlSetData($label1,$i&"%")
    If GUICtrlRead($label5) <> $i&"%" Then GUICtrlSetData($label5,$i&"%")
        If GUICtrlRead($label6) <> $i&"%" Then GUICtrlSetData($label6,$i&"%")
            If GUICtrlRead($label7) <> $i&"%" Then GUICtrlSetData($label7,$i&"%")
                If GUICtrlRead($label8) <> $i&"%" Then GUICtrlSetData($label8,$i&"%")
    
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Func incr()
    If $i<100 Then
    $i=$i+10
    EndIf
EndFunc
[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
Posted

Thanks!!

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

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
×
×
  • Create New...