Jump to content

help with progresson adding text


surreal
 Share

Recommended Posts

i would like to add more text to the first part of this script. when it is doing the progresson i would like to be able to add more text like please save & close microsoft office, stuff like that. i would have more then just one line of text to add. im not sure if im going about this correctly or maybe there is an easier or better way to do this. thanks for your help

#include <Constants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>

Opt('GUIEventOptions', 1)
Opt('TrayOnEventMode', 1)
Opt('TrayMenuMode', 1)
Opt("guioneventmode",1)

TraySetOnEvent($TRAY_EVENT_PRIMARYUP, 'FNC_MAXIMISE')

$GUI_COMPANY = 'Company Name'
$GUI_DISPLAY = 'Package Name'
$GUI_VERSION = 'Verison'
$GUI_NOTE = 'Package Notes'
$GUI_FNTNAME = 'Arial'

ProgressOn($GUI_COMPANY, $GUI_DISPLAY, "60 seconds") ;-----  This is the part that i would lkie to add more text
For $i = 1 to 90 step 1
    sleep(1000)
    ProgressSet( Int(($i/60)*100), $i & " seconds")
Next
ProgressSet(60 , $GUI_COMPANY, $GUI_DISPLAY)
sleep(500)
ProgressOff()

$GUI_GUIWNDW = GUICreate($GUI_COMPANY, 370, 185, -1, -1, $WS_EX_TOPMOST)

GUISetBkColor(0xEEEEEE)
GUISetFont(10, 800, 0, $GUI_FNTNAME)
$GUI_LABEL = GUICtrlCreateLabel($GUI_DISPLAY & ' ' & $GUI_VERSION, 10, 10, 345)

$GUI_GRAPHIC = GUICtrlCreateGraphic(10, 35, 345, 1)

GUISetFont(8, 400, 0, $GUI_FNTNAME)
$GUI_STAT = GUICtrlCreateLabel($GUI_NOTE, 25, 90, 305)
GUICtrlSetColor($GUI_STAT, 0X666666)

$GUI_PROGBAR = GUICtrlCreateProgress(10, 65, 345, 15, $PBS_SMOOTH)

$GUI_BUTTON = GUICtrlCreateButton("Minimise to System Tray", 102, 117, 150, 25, 0)
GUISetState(@SW_SHOW)

GUISetOnEvent($GUI_EVENT_MINIMIZE,"FNC_MINIMISE")
GUISetOnEvent($GUI_EVENT_CLOSE,"ExitNow")
GUIctrlSetOnEvent($GUI_BUTTON,"FNC_MINIMISE")

$PROGRESSBARSTARTATZERO = GUICtrlSetData($GUI_PROGBAR, 0)
$PERCENTAGE = 5

GUICtrlSetData($GUI_PROGBAR, $PERCENTAGE)
GUISetFont(8.5, 800, 0, $GUI_FNTNAME)
$GUI_SUB = GUICtrlCreateLabel('Status: Uninstalling PACKAGE-1', 20, 35, 305)
GUICtrlSetColor($GUI_SUB, 0X666666)
sleep(3000) ;--------------------------to simulate an install, will be replaced with runwait package name
$PERCENTAGE = $PERCENTAGE + 35

GUICtrlSetData($GUI_PROGBAR, $PERCENTAGE)
GUISetFont(8.5, 800, 0, $GUI_FNTNAME)
$GUI_SUB = GUICtrlCreateLabel('Status: Installing PACKAGE-2', 20, 35, 305)
GUICtrlSetColor($GUI_SUB, 0X666666)
sleep(3000) ;--------------------------to simulate an install, will be replaced with runwait package name
$PERCENTAGE = $PERCENTAGE + 35

GUICtrlSetData($GUI_PROGBAR, $PERCENTAGE)
GUISetFont(8.5, 800, 0, $GUI_FNTNAME)
$GUI_SUB = GUICtrlCreateLabel('Status: Installing PACKAGE-3', 20, 35, 305)
GUICtrlSetColor($GUI_SUB, 0X666666)
sleep(3000) ;--------------------------to simulate an install, will be replaced with runwait package name
$PERCENTAGE = $PERCENTAGE + 35

Func FNC_MINIMISE()
ConsoleWrite("minimizing" & @CRLF)
GUISetState(@SW_MINIMIZE)
GUISetState(@SW_HIDE)
TraySetState(1)
If @OSVersion = 'WIN_NT4' Or @OSVersion = 'WIN_ME' Or @OSVersion = 'WIN_98' Or @OSVersion = 'WIN_95' Then
TraySetToolTip($GUI_DISPLAY & 'Double click icon in System Tray to Restore')
Else
TrayTip($GUI_DISPLAY, 'Double click icon in System Tray to Restore', 5)
EndIf
EndFunc

Func FNC_MAXIMISE()
GUISetState(@SW_RESTORE)
GUISetState(@SW_SHOW)
TraySetState(2)
EndFunc

func ExitNow()
Exit
EndFunc
Link to comment
Share on other sites

I didnt understood what you what. but maybe this helps:

change these lines:

ProgressOn($GUI_COMPANY, $GUI_DISPLAY, "60 seconds" & @CRLF & "More Text!") ;----- This is the part that i would lkie to add more text

For $i = 1 to 90 step 1

sleep(1000)

ProgressSet( Int(($i/60)*100), $i & " seconds"& @CRLF & "More Text!"& @CRLF & "Another Line")

Next

You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"
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...