Sign in to follow this  
Followers 0
dbecker

does changing between tabs send out a message to the GUI?

16 posts in this topic

I'm wondering if there is a way to have an edit box be cleared out when a user changes between tabs.

GUICreate("The RezNet Setup Application",640,480)
$tab1=GUICtrlCreateTabitem ("          Required Updates and Programs            ")
$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\imtlogo.jpg",320,26,320,237)
$tab1Edit = GUICtrlCreateEdit("",320,263,320,220,$ES_MULTILINE + $ES_AUTOVSCROLL + $WS_EX_TRANSPARENT)
GUISetBkColor (-1, 0x415A57)
GUICtrlSetColor (-1, 0xB1B1AD)

$tab1XPPatchLabel=GUICtrlCreateLabel ("1. Windows Updates",80,32,240,20,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab1XPPatchLabel,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\windows.jpg",5,40,70,60)
$tab1XPPatch=GUICtrlCreateButton ("Install",80,51,240,30)
$tab1XPPatchInfo=GUICtrlCreateButton ("Information",80,81,240,30)

$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\bar.jpg",0,115,320,3)
$tab1SP2Label=GUICtrlCreateLabel ("2. Windows XP Service Pack 2",80,126,240,20,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab1SP2Label,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab1SP2=GUICtrlCreateButton ("Install",80,146,240,30)
$tab1SP2Info=GUICtrlCreateButton ("Information",80,176,240,30)

$tab1CCAALabel=GUICtrlCreatelabel ("3. Cisco Clean Access Agent",80,221,240,20,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab1CCAALabel,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\ccaa.jpg",0,225,80,70)
$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\bar.jpg",0,210,320,3)
$tab1CCAA=GUICtrlCreateButton ("Install",80,241,240,30)
$tab1CCAAInfo=GUICtrlCreateButton ("Information",80,271,240,30)

$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\bar.jpg",0,310,320,3)
$tab1NortonLabel=GUICtrlCreateLabel ("4. Norton AntiVirus",80,316,240,20,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab1NortonLabel,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\symantec.bmp",16,333,49,46)
$tab1Norton=GUICtrlCreateButton ("Install",80,336,240,30)
$tab1NortonInfo=GUICtrlCreateButton ("Information",80,366,240,30)

$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\bar.jpg",0,402,320,3)
$tab1NortonUpdateLabel=GUICtrlCreateLabel ("5. Norton Virus Definitions",80,411,240,25,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab1NortonUpdateLabel,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab1NortonUpdatesInfo=GUICtrlCreateButton ("Information",80,429,240,30)

Do
  $msg = GUIGetMsg ()

   Select
      Case $msg = $tab1XPPatchInfo
         GUICtrlSetData ($tab1Edit, "Windows Updates:   This program will install all of the post-Service Pack 2 updates that are required to access the network.")
      Case $msg = $tab1SP2Info
         GUICtrlSetData ($tab1Edit, "Windows XP Service Pack 2:   This is a very large package of updates and hotfixes for Windows XP. Most 'factory fresh' computers now come with it pre-installed, but if the 'Scan Results' tab indicates that you require it, please install it before proceeding to other Windows updates. Be aware that this installation will usually take between 30 minuntes and 2 hours, depending on your computer. It will require you to restart your computer once it is finished installing.")
      Case $msg = $tab1NortonInfo
         GUICtrlSetData ($tab1Edit, "Norton AntiVirus:   This is APU's corporate edition of Norton Anti-Virus. While you are required to have an antivirus program, and keep it updated, you do not necessarilly have to use ours. However, this version has a four-year subscription with it to Live-Update for up-to-date virus definitions. If you need to and are oing to install this one, please un-install other versions of Norton, as well as other anti-virus programs before installing this one.")
      Case $msg = $tab1CCAAInfo
         GUICtrlSetData ($tab1Edit, "Cisco Clean Access Agent: This is the program that you must use to log on to the student networks. Clean Access scans your computer, checking for required programs and updates. You must have Windows and you antivirus programs completly up to date to access the network so that we can ensure a safe working environment.")
      Case $msg = $tab1NortonUpdatesInfo
         $url = "C:\Ubertor Patch\Updating_Symantec_Antivirus.html"
     Run("C:\Program Files\Internet Explorer\iexplore.exe " & $url)
      Case $msg = $tab2                         ;
         GUICtrlSetData ($tab1Edit, "")       ;this is what I wanted to try but it does not work.
      Case $msg = $tab1                         ;there is a second tab with similar attributes that            GUICtrlSetData ($tab2Edit, "")                  ; I did not include
 Endselect

I want the edit boxes in tab 1 and tab 2 to be cleared out when the user leaves the tab.


"I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$tab = GUICtrlCreateTab(0, 22, 510, 390)
    $current = _GUICtrlTabGetCursel ($tab)

i dont see you actually creating a tab, just tab items.

put the second line in your main loop and use an "if" or "case" statement to do a certain function when "$current" is the value you want... (meaning the focus ISNT on the tab in question.. delete the stuff)

$current will be 0 for the first tab item, 1 for the second... 2 for the third...

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

$tab = GUICtrlCreateTab(0, 22, 510, 390)
    $current = _GUICtrlTabGetCursel ($tab)
I'm not quite sure what you mean. is that
_GUICtrlTabGetCursel ($tab)
a user defined function? I really haven't gotten in to those, so I don't understand where you are going with that

"I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements

Share this post


Link to post
Share on other sites

please include entire code and i will edit it for an example

yours is givin me too many errors as it is


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

lol ok, sorry

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author:        David Becker <dfbecker@apu.edu>
;
; Script Function:
; Student Distribution of RezNet Setup Application
;
; ----------------------------------------------------------------------------

#include <GUIConstants.au3>
#include <Array.au3>
Global $diagnose[28]
Global $n = 1
ProgressOn ("Now Diagnosing...","Please wait for the scan to finish")
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB873333", "Installed") then
$diagnose[$n] = "Windows Update KB873333       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (4)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB885250", "Installed") then 
$diagnose[$n] = "Windows Update KB885250       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (8)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB886185", "Installed") then 
$diagnose[$n] = "Windows Update KB886185       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (12)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB888113", "Installed") then 
$diagnose[$n] = "Windows Update KB888113       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (16) 
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB891781", "Installed") then 
$diagnose[$n] = "Windows Update KB891781       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (20)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB893066", "Installed") then 
$diagnose[$n] = "Windows Update KB893066       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (24)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB896358", "Installed") then 
$diagnose[$n] = "Windows Update KB896358       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (28)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB896422", "Installed") then 
$diagnose[$n] = "Windows Update KB896422       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (32)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB896423", "Installed") then 
$diagnose[$n] = "Windows Update KB896423       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (36)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB896424", "Installed") then 
$diagnose[$n] = "Windows Update KB896424       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (40)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB896688", "Installed") then 
$diagnose[$n] = "Windows Update KB896688       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (43)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB896727", "Installed") then 
$diagnose[$n] = "Windows Update KB896727       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (45)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB899588", "Installed") then 
$diagnose[$n] = "Windows Update KB899588       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (47)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB899589", "Installed") then 
$diagnose[$n] = "Windows Update KB899589       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (50)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB900725", "Installed") then 
$diagnose[$n] = "Windows Update KB900725       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (54)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB901017", "Installed") then 
$diagnose[$n] = "Windows Update KB901017       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (57)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB901214", "Installed") then 
$diagnose[$n] = "Windows Update KB901214       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (61)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB902400", "Installed") then 
$diagnose[$n] = "Windows Update KB902400       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (64)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB904706", "Installed") then 
$diagnose[$n] = "Windows Update KB904706       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (68)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB905414", "Installed") then 
$diagnose[$n] = "Windows Update KB905414       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (71)
If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB905749", "Installed") then 
$diagnose[$n] = "Windows Update KB905749       Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (75)
If NOT FileExists ("C:\Program Files\Microsoft AntiSpyware\GIANTAntiSpywareMain.exe") Then 
$diagnose[$n] = "Microsoft Anti-SpyWare     Optional"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (78)
If NOT FileExists ("C:\Program Files\Symantec AntiVirus\VPTray.exe") then 
$diagnose[$n] = "Norton Anti-Virus           Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (82)
If NOT FileExists ("C:\Program Files\Cisco Systems\Clean Access Agent\CCAAgent.exe") then 
$diagnose[$n] = "Cisco Clean Access Agent     Required"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (86)
If NOT FileExists ("C:\Program Files\Mozilla Firefox\firefox.exe") Then 
$diagnose[$n] = "Mozilla Firefox               Optional"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (89)
If NOT FileExists ("C:\Program Files\Spybot - Search & Destroy\SpybotSD.exe") Then 
$diagnose[$n] = "Spy-Bot Search and Destroy Optional"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (93)
If NOT FileExists ("C:\Program Files\Lavasoft\Ad-Aware SE Personal\Ad-Aware.exe") Then 
$diagnose[$n] = "Ad-Aware SE Personal         Optional"
$n = $n + 1
EndIf
Sleep (150)
ProgressSet (96)
If NOT FileExists ("C:\WINDOWS\system32\xpsp2res.dll") Then 
$diagnose[$n] = "WindowsXP Service Pack2       Required"
$n = $n + 1
EndIf
ProgressSet (100)
ProgressOff()


MsgBox (0, "Welcome", "This program will give you everything that you need to access the student networks here on campus. First, look at the list provided, which will indicate any updates and programs that we provide that you have not yet installed. The items that you must have are on the 'Required Updates and Programs' tab, while other items, that are important and/or useful, but not required, are on the 'Optional Programs' tab. Please read the information provided for the required programs for instruction. If you have any questions, please reference the Help File. If you require additional assistance, contact the Support Desk")

DirCreate ("C:\Ubertor Patch")
GUICreate("The RezNet Setup Application",640,480) ; will create a dialog box that when displayed is centered
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\imtlogo.jpg", "C:\WINDOWS\system32\oobe\images\imtlogo.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\HelpFile.html", "C:\Ubertor Patch\HelpFile.html")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\Updating_Symantec_Antivirus.html", "C:\Ubertor Patch\Updating_Symantec_Antivirus.html")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\imtsslogo.jpg", "C:\Ubertor Patch\imtsslogo.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\start.jpg", "C:\Ubertor Patch\start.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\end.jpg", "C:\Ubertor Patch\end.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\finish.jpg", "C:\Ubertor Patch\finish.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\LiveUpdate.jpg", "C:\Ubertor Patch\LiveUpdate.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\main.jpg", "C:\Ubertor Patch\main.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\tray.jpg", "C:\Ubertor Patch\tray.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\updating.jpg", "C:\Ubertor Patch\updating.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\windows.jpg", "C:\WINDOWS\system32\oobe\images\windows.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\symantec.bmp", "C:\WINDOWS\system32\oobe\images\symantec.bmp")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\firefox.jpg", "C:\WINDOWS\system32\oobe\images\firefox.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\ccaa.jpg", "C:\WINDOWS\system32\oobe\images\ccaa.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\sbsdlogo.bmp", "C:\WINDOWS\system32\oobe\images\sbsdlogo.bmp")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\adobereader.bmp", "C:\WINDOWS\system32\oobe\images\adobereader.bmp")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\trillian.jpg", "C:\WINDOWS\system32\oobe\images\trillian.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\msasw.jpg", "C:\WINDOWS\system32\oobe\images\msasw.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\adaware.bmp", "C:\WINDOWS\system32\oobe\images\adaware.bmp")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\apulogoteal.jpg", "C:\Windows\system32\oobe\images\apulogoteal.jpg")
FileInstall ("C:\Documents and Settings\David Becker\My Documents\Work\Ubertor Patch\bar.jpg", "C:\Windows\system32\oobe\images\bar.jpg")


GUISetFont(9, 300)
GUISetBkColor(0x415A57)
$tab=GUICtrlCreateTab (0,0,640,25)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab0=GUICtrlCreateTabitem ("              Scan Results             ")
$tab0=GUICtrlCreatePic(@Systemdir & "\oobe\images\imtlogo.jpg",320,26,320,237)
$tab0=GUICtrlCreatePic(@Systemdir & "\oobe\images\apulogoteal.jpg",198,385,122,78)
$tab0=GUICtrlCreateLabel ("The programs and updates that you need are listed below.",320,267,320,20)
GUICtrlSetColor (-1, 0xB1B1AD)

Local $List = ''
For $I = 1 To $N - 1
    $List = $List & $Diagnose[$I] & @CRLF
Next
$Font = "Times New Roman Bold"
$Tab0Edit = GUICtrlCreateEdit($List,320,285,320,152, $ES_AUTOVSCROLL + $WS_VSCROLL)
GUICtrlSetColor (-1, 0xB1B1AD)
GUISetBkColor (-1, 0x415A57)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab0ReScan=GUICtrlCreateButton ("Re-Scan",320,436,320,25)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab0InstructionsLabel=GUICtrlCreateLabel ("Instructions: PLEASE READ",1,26,320,20)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab0InstructionsLabel,15,450,0,$Font)
$tab0InfoLabel=GUICtrlCreateLabel ("This program gives you everything that you need to access the student networks here on campus. First, look at the list provided, and install any required updates and programs. The items that you must have are on the 'Required Updates and Programs' tab, while other items, that are important and/or useful, but not required, are on the 'Optional Programs' tab. Please read the information provided for the required programs for instruction. If you have any questions, please reference the Help File. If you require additional assistance, contact the Support Desk, as listed below.",0,48,320,450)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab0InfoLabel,11,150,0,$Font)
GUISetBkColor (-1, 0x415A57)
$tab0datelabel=GUICtrlCreateLabel ("The information contained in this CD is time sensitive. After Jan. 31st, this CD will not be guaranteed to have everything, but Clean Access will be able to give you anything else you need.",0,250,320,60)
$tab0SupportLabel=GUICtrlCreateLabel ("IMT Support Desk",0,308,320,20)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab0PhoneLabel=GUICtrlCreateLabel("Phone: (626)815-5050",0,328,320,20)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab0EmailLabel=GUICtrlCreateLabel("Email: support@apu.edu",0,348,320,20) 
GUICtrlSetColor (-1, 0xB1B1AD)
$tab0MonLabel=GUICtrlCreateLabel ("Mon - Thur 7:00 AM to 10:00 PM",0,368,320,20) 
GUICtrlSetColor (-1, 0xB1B1AD)
$tab0FriLabel=GUICtrlCreateLabel ("Fri 8:00 AM to 5:00 PM",0,388,320,20)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab0SatLabel=GUICtrlCreateLabel ("Sat 12:00 PM to 6:00 PM",0,408,320,20)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab0SunLabel=GUICtrlCreatelabel ("Sun 2:00 PM to 8:00 PM",0,428,320,20)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab0SupportLabel,14,400,0,$Font)
GUICtrlSetFont ($tab0PhoneLabel,14,400,0,$Font)
GUICtrlSetFont ($tab0EmailLabel,14,400,0,$Font)
GUICtrlSetFont ($tab0MonLabel,14,400,0,$Font)
GUICtrlSetFont ($tab0FriLabel,14,400,0,$Font)
GUICtrlSetFont ($tab0SatLabel,14,400,0,$Font)
GUICtrlSetFont ($tab0SunLabel,14,400,0,$Font)

$tab1=GUICtrlCreateTabitem ("          Required Updates and Programs            ")
$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\imtlogo.jpg",320,26,320,237)
$tab1Edit = GUICtrlCreateEdit("",320,263,320,220,$ES_MULTILINE + $ES_AUTOVSCROLL + $WS_EX_TRANSPARENT)
GUISetBkColor (-1, 0x415A57)
GUICtrlSetColor (-1, 0xB1B1AD)

$tab1XPPatchLabel=GUICtrlCreateLabel ("1. Windows Updates",80,32,240,20,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab1XPPatchLabel,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\windows.jpg",5,40,70,60)
$tab1XPPatch=GUICtrlCreateButton ("Install",80,51,240,30)
$tab1XPPatchInfo=GUICtrlCreateButton ("Information",80,81,240,30)

$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\bar.jpg",0,115,320,3)
$tab1SP2Label=GUICtrlCreateLabel ("2. Windows XP Service Pack 2",80,126,240,20,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab1SP2Label,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab1SP2=GUICtrlCreateButton ("Install",80,146,240,30)
$tab1SP2Info=GUICtrlCreateButton ("Information",80,176,240,30)

$tab1CCAALabel=GUICtrlCreatelabel ("3. Cisco Clean Access Agent",80,221,240,20,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab1CCAALabel,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\ccaa.jpg",0,225,80,70)
$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\bar.jpg",0,210,320,3)
$tab1CCAA=GUICtrlCreateButton ("Install",80,241,240,30)
$tab1CCAAInfo=GUICtrlCreateButton ("Information",80,271,240,30)

$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\bar.jpg",0,310,320,3)
$tab1NortonLabel=GUICtrlCreateLabel ("4. Norton AntiVirus",80,316,240,20,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab1NortonLabel,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\symantec.bmp",16,333,49,46)
$tab1Norton=GUICtrlCreateButton ("Install",80,336,240,30)
$tab1NortonInfo=GUICtrlCreateButton ("Information",80,366,240,30)

$tab1=GUICtrlCreatePic(@Systemdir & "\oobe\images\bar.jpg",0,402,320,3)
$tab1NortonUpdateLabel=GUICtrlCreateLabel ("5. Norton Virus Definitions",80,411,240,25,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab1NortonUpdateLabel,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab1NortonUpdatesInfo=GUICtrlCreateButton ("Information",80,429,240,30)


;tab2 creation
$tab2=GUICtrlCreateTabItem ("           Optional Programs            ")
$tab2=GUICtrlCreatePic(@Systemdir & "\oobe\images\imtlogo.jpg",320,26,320,237)
$tab2Edit = GUICtrlCreateEdit("",320,263,320,220,$ES_MULTILINE + $ES_AUTOVSCROLL + $WS_EX_TRANSPARENT)
GUISetBkColor (-1, 0x415A57)
GUICtrlSetColor (-1, 0xB1B1AD)

$tab2MicrosoftASWLabel=GUICtrlCreateLabel ("1. Install Microsoft AntiSpyWare",80,26,240,20,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab2MicrosoftASWLabel,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab2=GUICtrlCreatePic(@Systemdir & "\oobe\images\msasw.jpg",6,29,70,65)
$tab2MicrosoftASW=GUICtrlCreateButton ("Install",80,42,240,27)
$tab2MicrosoftASWInfo=GUICtrlCreateButton ("Information",80,69,240,27)
$tab2=GUICtrlCreatePic(@Systemdir & "\oobe\images\bar.jpg",0,98,320,3)

$tab2AdAwareLabel=GUICtrlCreateLabel ("2. Install Ad-Aware SE Personal",80,103,240,20,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab2AdAwareLabel,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab2=GUICtrlCreatePic(@Systemdir & "\oobe\images\adaware.bmp",4,111,50,50)
$tab2AdAware=GUICtrlCreateButton ("Install",80,117,240,27)
$tab2AdAwareInfo=GUICtrlCreateButton ("Information",80,143,240,27)

$tab2=GUICtrlCreatePic(@Systemdir & "\oobe\images\bar.jpg",0,171,320,3)
$tab2SpyBotLabel=GUICtrlCreatelabel ("3. Install SpyBot Search and Destroy",80,176,240,20,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab2SpyBotLabel,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab2=GUICtrlCreatePic(@Systemdir & "\oobe\images\sbsdlogo.bmp",1,192,79,30)
$tab2SpyBot=GUICtrlCreateButton ("Install",80,191,240,27)
$tab2SpyBotInfo=GUICtrlCreateButton ("Information",80,218,240,27)

$tab2=GUICtrlCreatePic(@Systemdir & "\oobe\images\bar.jpg",0,248,320,3)
$tab2FireFoxLabel=GUICtrlCreateLabel ("4. Install Mozilla Firefox",80,251,240,20,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab2FireFoxLabel,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab2=GUICtrlCreatePic(@Systemdir & "\oobe\images\firefox.jpg",11,256,60,60)
$tab2Firefox=GUICtrlCreateButton ("Install",80,264,240,27)
$tab2FirefoxInfo=GUICtrlCreateButton ("Information",80,291,240,27)

$tab2=GUICtrlCreatePic(@Systemdir & "\oobe\images\bar.jpg",0,321,320,3)
$tab2TrillianLabel=GUICtrlCreateLabel ("5. Install Trillian Instant Messenger",80,322,240,25,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab2TrillianLabel,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab2=GUICtrlCreatePic(@Systemdir & "\oobe\images\trillian.jpg",1,326,78,61)
$tab2Trillian=GUICtrlCreateButton ("Install",80,334,240,27)
$tab2TrillianInfo=GUICtrlCreateButton ("Information",80,359,240,27)

$tab2=GUICtrlCreatePic(@Systemdir & "\oobe\images\bar.jpg",0,389,320,3)
$tab2AcrobatLabel=GUICtrlCreateLabel ("6. Install Adobe Acrobat Reader",80,393,240,20,$SS_CENTER)
GUICtrlSetColor (-1, 0xB1B1AD)
GUICtrlSetFont ($tab2AcrobatLabel,10,400,0,$Font)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab2=GUICtrlCreatePic(@Systemdir & "\oobe\images\adobereader.bmp",6,395,70,62)
$tab2Acrobat=GUICtrlCreateButton ("Install",80,407,240,27)
$tab2AcrobatInfo=GUICtrlCreateButton ("Information",80,430,240,27)

GUICtrlCreateTabitem ("")  ; end tabitem definition

$filemenu = GUICtrlCreateMenu ("&File",-1,1)

$helpmenu = GUICtrlCreateMenu ("&Help")

$helpitem = GUICtrlCreateMenuitem ("Help",$helpmenu)
$exititem = GUICtrlCreateMenuitem ("Exit",$filemenu)
$abootitem = GUICtrlCreateMenuitem ("Aboot",$helpmenu)

GUISetState ()
Do
  $msg = GUIGetMsg ()

   Select
      Case $msg = $tab1XPPatch
     Run (@ScriptDir & "\Ubertor Patch\XPPatch Installer.exe")
      Case $msg = $tab1Norton
         Run (@ScriptDir & "\Ubertor Patch\Norton 10 Installer2.exe")
      Case $msg = $tab2MicrosoftASW
     Run (@ScriptDir & "\Ubertor Patch\MicrosoftASW AutoInstaller.exe")
      Case $msg = $tab2AdAware
     Run (@ScriptDir & "Ubertor Patch\aawsepersonal.exe")
      Case $msg = $tab1CCAA
     Run (@ScriptDir & "Ubertor Patch\CCAAgent_Setup.exe")
      Case $msg = $tab2Firefox
     Run (@ScriptDir & "Ubertor Patch\Firefox Setup.exe")
      Case $msg = $tab2Acrobat
     Run (@ScriptDir & "Ubertor Patch\AcrobatSetup.exe")
      Case $msg = $tab2Trillian
     Run (@ScriptDir & "Ubertor Patch\Trillian.exe")
      Case $msg = $tab2SpyBot
     Run (@ScriptDir & "Ubertor Patch\spybotsd14.exe")
      Case $msg = $tab1SP2
     Run (@ScriptDir & "Ubertor Patch\WindowsXP-KB835935.exe")
      Case $msg = $tab1XPPatchInfo
         GUICtrlSetData ($tab1Edit, "Windows Updates:   This program will install all of the post-Service Pack 2 updates that are required to access the network.")
      Case $msg = $tab1SP2Info
         GUICtrlSetData ($tab1Edit, "Windows XP Service Pack 2:   This is a very large package of updates and hotfixes for Windows XP. Most 'factory fresh' computers now come with it pre-installed, but if the 'Scan Results' tab indicates that you require it, please install it before proceeding to other Windows updates. Be aware that this installation will usually take between 30 minuntes and 2 hours, depending on your computer. It will require you to restart your computer once it is finished installing.")
      Case $msg = $tab1NortonInfo
         GUICtrlSetData ($tab1Edit, "Norton AntiVirus:   This is APU's corporate edition of Norton Anti-Virus. While you are required to have an antivirus program, and keep it updated, you do not necessarilly have to use ours. However, this version has a four-year subscription with it to Live-Update for up-to-date virus definitions. If you need to and are oing to install this one, please un-install other versions of Norton, as well as other anti-virus programs before installing this one.")
      Case $msg = $tab1CCAAInfo
         GUICtrlSetData ($tab1Edit, "Cisco Clean Access Agent: This is the program that you must use to log on to the student networks. Clean Access scans your computer, checking for required programs and updates. You must have Windows and you antivirus programs completly up to date to access the network so that we can ensure a safe working environment.")
      Case $msg = $tab1NortonUpdatesInfo
         $url = "C:\Ubertor Patch\Updating_Symantec_Antivirus.html"
     Run("C:\Program Files\Internet Explorer\iexplore.exe " & $url)
      Case $msg = $tab2MicrosoftASWInfo
         GUICtrlSetData ($tab2Edit, "Microsoft AntiSpyware:   This program is a popular, effective anti-spyware program. While Optional for the network, it is still a wise program to have on hand for regular use.")
      Case $msg = $tab2AdAwareInfo
         GUICtrlSetData ($tab2Edit, "Ad-Aware SE Personal:   This program is a popular, effective anti-spyware program. While Optional for the network, it is still a wise program to have on hand for regular use.")
      Case $msg = $tab2FirefoxInfo
         GUICtrlSetData ($tab2Edit, "Mozilla Firefox 1.5:   This program is a web browser that is a very widely acceptable alternative to using Internet Explorer. Please note that it is not a requirement, nor is it supported by APU yet.")
      Case $msg = $tab2TrillianInfo
         GUICtrlSetData ($tab2Edit, "Trillian Basic 3:   This program is a popular alternative to using AIM, MSN, and Yahoo! instant messenger programs. Also not a requirement.")
      Case $msg = $tab2AcrobatInfo
         GUICtrlSetData ($tab2Edit, "Adobe Acrobat Reader:   This program is used to open .PDF files. You will not be able to open these file types without Acrobat Reader.")
      Case $msg = $tab2SpyBotInfo
         GUICtrlSetData ($tab2Edit, "SpyBot Search and Destroy:   This program is a popular, effective anti-spyware program. While Optional for the network, it is still a wise program to have on hand for regular use.")
      Case $msg = $tab2
         GUICtrlSetData ($tab1Edit, "")
      Case $msg = $tab1
         GUICtrlSetData ($tab2Edit, "")
      Case $msg = $tab0ReScan
    GUICtrlSetData ($tab0Edit, "")
    Dim $diagnose2[28]
    Dim $p = 1 
    ProgressOn ("Now Diagnosing...","Please wait while we scan your computer")
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB873333", "Installed") then
    $diagnose2[$p] = "Windows Update KB873333      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (4)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB885250", "Installed") then 
    $diagnose2[$p] = "Windows Update KB885250      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (8)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB886185", "Installed") then 
    $diagnose2[$p] = "Windows Update KB886185      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (12)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB888113", "Installed") then 
    $diagnose2[$p] = "Windows Update KB888113      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (16) 
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB891781", "Installed") then 
    $diagnose2[$p] = "Windows Update KB891781      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (20)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB893066", "Installed") then 
    $diagnose2[$p] = "Windows Update KB893066      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (24)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB896358", "Installed") then 
    $diagnose2[$p] = "Windows Update KB896358      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (28)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB896422", "Installed") then 
    $diagnose2[$p] = "Windows Update KB896422      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (32)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB896423", "Installed") then 
    $diagnose2[$p] = "Windows Update KB896423      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (36)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB896424", "Installed") then 
    $diagnose2[$p] = "Windows Update KB896424      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (40)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB896688", "Installed") then 
    $diagnose2[$p] = "Windows Update KB896688      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (43)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB896727", "Installed") then 
    $diagnose2[$p] = "Windows Update KB896727      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (45)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB899588", "Installed") then 
    $diagnose2[$p] = "Windows Update KB899588      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (47)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB899589", "Installed") then 
    $diagnose2[$p] = "Windows Update KB899589      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (50)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB900725", "Installed") then 
    $diagnose2[$p] = "Windows Update KB900725      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (54)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB901017", "Installed") then 
    $diagnose2[$p] = "Windows Update KB901017      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (57)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB901214", "Installed") then 
    $diagnose2[$p] = "Windows Update KB901214      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (61)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB902400", "Installed") then 
    $diagnose2[$p] = "Windows Update KB902400      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (64)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB904706", "Installed") then 
    $diagnose2[$p] = "Windows Update KB904706      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (68)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB905414", "Installed") then 
    $diagnose2[$p] = "Windows Update KB905414      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (71)
    If NOT RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB905749", "Installed") then 
    $diagnose2[$p] = "Windows Update KB905749      Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (75)
    If NOT FileExists ("C:\Program Files\Microsoft AntiSpyware\GIANTAntiSpywareMain.exe") Then
    $diagnose2[$p] = "Microsoft Anti-SpyWare        Optional"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (78)
    If NOT FileExists ("C:\Program Files\Symantec AntiVirus\VPTray.exe") then 
    $diagnose2[$p] = "Norton Anti-Virus          Required"
    $n = $n + 1
    EndIf
    Sleep (150)
    ProgressSet (82)
    If NOT FileExists ("C:\Program Files\Cisco Systems\Clean Access Agent\CCAAgent.exe") then 
    $diagnose2[$p] = "Cisco Clean Access Agent    Required"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (86)
    If NOT FileExists ("C:\Program Files\Mozilla Firefox\firefox.exe") Then 
    $diagnose2[$p] = "Mozilla Firefox              Optional"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (89)
    If NOT FileExists ("C:\Program Files\Spybot - Search & Destroy\SpybotSD.exe") Then 
    $diagnose2[$p] = "Spy-Bot Search and Destroy    Optional"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (93)
    If NOT FileExists ("C:\Program Files\Lavasoft\Ad-Aware SE Personal\Ad-Aware.exe") Then 
    $diagnose2[$p] = "Ad-Aware SE Personal        Optional"
    $p = $p + 1
    EndIf
    Sleep (150)
    ProgressSet (96)
    If NOT FileExists ("C:\WINDOWS\system32\xpsp2res.dll") Then 
    $diagnose2[$p] = "WindowsXP Service Pack2      Required"
    $p = $p + 1
    EndIf
    ProgressSet (100)
    ProgressOff()
    Local $List2 = ''
    For $h = 1 To $p - 1
       $List2 = $List2 & $Diagnose2[$h] & @CRLF
    Next
    GUICtrlSetData ($tab0edit, $List2)
   EndSelect
      If $msg = $GUI_EVENT_CLOSE Or $msg = $exititem Then
          FileRecycle ("C:\Ubertor Patch")
          Exitloop
      EndIf
      If $msg = $helpitem Then 
              $url = "C:\Ubertor Patch\HelpFile.html"
        Run("c:\program files\internet explorer\iexplore.exe " & $url)
      EndIf
      If $msg = $abootitem Then MsgBox (0, "Aboot", "RezNet Setup Application Student V3.0. ")
Until $msg = $GUI_EVENT_CLOSE

"I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Untested, but how about...

$Tab = GUICtrlCreateTab(5,-1,$GUIWidth-10,$GUIHeight-30,$TCS_HOTTRACK,$WS_EX_CLIENTEDGE)
GUICtrlSetOnEvent($Tab,"OnTab")

$Tab1 = GUICtrlCreateTabItem(" Tab1 ")
; some stuff in here
$Tab2 = GUICtrlCreateTabItem(" Tab2 ")
; some stuff in here
$Tab3 = GUICtrlCreateTabItem(" Tab3 ")
; some stuff in here
GUICtrlCreateTabItem("")

Func OnTab()
    Select
        Case GUICtrlRead($Tab) = 0
    ; some stuff in here
        Case GUICtrlRead($Tab) = 1
    ; some stuff in here
        Case GUICtrlRead($Tab) = 2
    ; some stuff in here
    EndSelect
EndFunc

Edit: Fixed brainfart (had all the tabs set to $Tab1 - DUH!)

Edited by PartyPooper

Share this post


Link to post
Share on other sites

thanks PartyPooper, I'm in class right now, but when I get some time later I'll give it a shot


"I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements

Share this post


Link to post
Share on other sites

okay, first I tried to leave it in my big Do... Until statement at the end of my script, but it when I ran the script it wouldn't recognize the Until in the statement. when I placed it before the Do.. Until the script would run, but the information buttons would not display anything in the edit boxes. I didn't add/change anything but this:

Func OnTab()
   Select
        Case GUICtrlRead($Tab) = 1
          GUICtrlSetData ($tab2Edit, "")
        Case GUICtrlRead($Tab) = 2
          GUICtrlSetData ($tab1Edit, "")
    Case GUICtrlRead($Tab) = 0
      GUICtrlSetData ($tab1Edit, "")
      GUICtrlSetData ($tab2Edit, "")
   EndSelect
EndFunc

and this

$tab=GUICtrlCreateTab (0,0,640,25)
GUICtrlSetOnEvent($tab,"OnTab")

1. is this correct for the code

2. where should it be so that it doesn't interfere with operation of other functions of the script


"I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements

Share this post


Link to post
Share on other sites

Sorry, I'm only new at this as well but I'll try and help :-)

Firstly, I don't think the following lines are correct because you are continually resetting the var $tab0 (unless that's what you want to do?):

$tab=GUICtrlCreateTab (0,0,640,25)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab0=GUICtrlCreateTabitem ("              Scan Results             ")
$tab0=GUICtrlCreatePic(@Systemdir & "\oobe\images\imtlogo.jpg",320,26,320,237)
$tab0=GUICtrlCreatePic(@Systemdir & "\oobe\images\apulogoteal.jpg",198,385,122,78)
$tab0=GUICtrlCreateLabel ("The programs and updates that you need are listed below.",320,267,320,20)
GUICtrlSetColor (-1, 0xB1B1AD)

Try:

$tab=GUICtrlCreateTab (0,0,640,25)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab0=GUICtrlCreateTabitem ("              Scan Results             ")
$tab0Pic1=GUICtrlCreatePic(@Systemdir & "\oobe\images\imtlogo.jpg",320,26,320,237)
$tab0Pic2=GUICtrlCreatePic(@Systemdir & "\oobe\images\apulogoteal.jpg",198,385,122,78)
$tab0Label=GUICtrlCreateLabel ("The programs and updates that you need are listed below.",320,267,320,20)
GUICtrlSetColor (-1, 0xB1B1AD)

or even:

$tab=GUICtrlCreateTab (0,0,640,25)
GUICtrlSetColor (-1, 0xB1B1AD)
$tab0=GUICtrlCreateTabitem ("              Scan Results             ")
GUICtrlCreatePic(@Systemdir & "\oobe\images\imtlogo.jpg",320,26,320,237)
GUICtrlCreatePic(@Systemdir & "\oobe\images\apulogoteal.jpg",198,385,122,78)
GUICtrlCreateLabel ("The programs and updates that you need are listed below.",320,267,320,20)
GUICtrlSetColor (-1, 0xB1B1AD)

Share this post


Link to post
Share on other sites

It appears you do the same for most of the $tab... variables. You may need to change these first.

Also there was a bug in my original posting. Should have been:

$Tab = GUICtrlCreateTab(5,-1,$GUIWidth-10,$GUIHeight-30,$TCS_HOTTRACK,$WS_EX_CLIENTEDGE)
GUICtrlSetOnEvent($Tab,"OnTab")

$Tab1 = GUICtrlCreateTabItem(" Tab1 ")
; some stuff in here
$Tab2 = GUICtrlCreateTabItem(" Tab2 ")
; some stuff in here
$Tab3 = GUICtrlCreateTabItem(" Tab3 ")
; some stuff in here
GUICtrlCreateTabItem("")

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

that first one should be good. I need to specify where it is going or else it will show up on all three tabs, but that variable issue may be the problem.

edit:

i saw that, but I got where you were going with it

Edited by dbecker

"I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements

Share this post


Link to post
Share on other sites

1. is this correct for the code

2. where should it be so that it doesn't interfere with operation of other functions of the script

Looks OK. I normally put all my functions after the main script loop. GUICtrlCreateTab() must come before GUICtrlCreateTabItem() and you also must close off your tab items like so:

$tab=GUICtrlCreateTab (0,0,640,25)
GUICtrlSetOnEvent($tab,"OnTab")

$tab0=GUICtrlCreateTabitem ("              Scan Results             ")
; stuff in here

$tab1=GUICtrlCreateTabitem ("          Required Updates and Programs            ")
; stuff in here

$tab2=GUICtrlCreateTabItem ("           Optional Programs            ")
; stuff in here

GUICtrlCreateTabitem ("") ; end tabitem definition

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

do I need to include at the beginning of the script the Opt(GUIOnEventMode) thing at the beginning of the script? or does the GUICtrlOnEvent function work without it? because I added that at the beginning, and nothing would display in the edit boxxes, and the exit buttons wouldn't work. maybe I should try w/out it?

Edited by dbecker

"I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements

Share this post


Link to post
Share on other sites

Yeah, you need to include it at the beginning of your script to use GUICtrlOnEvent

Share this post


Link to post
Share on other sites

Yeah, you need to include it at the beginning of your script to use GUICtrlOnEvent

I'm not sure what the problem is but this on event stuff is disrupting the functions of the app. nothing works. you have to use the taskbar icon just to exit the script. I'm just going to scrap this tab refresh idea for now. I haven't used onevent before, so I'm not really familiar with how it works. thanks anyways for the help.


"I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements

Share this post


Link to post
Share on other sites

okay, first I tried to leave it in my big Do... Until statement at the end of my script, but it when I ran the script it wouldn't recognize the Until in the statement. when I placed it before the Do.. Until the script would run, but the information buttons would not display anything in the edit boxes. I didn't add/change anything but this:

Func OnTab()
   Select
        Case GUICtrlRead($Tab) = 1
          GUICtrlSetData ($tab2Edit, "")
        Case GUICtrlRead($Tab) = 2
          GUICtrlSetData ($tab1Edit, "")
    Case GUICtrlRead($Tab) = 0
      GUICtrlSetData ($tab1Edit, "")
      GUICtrlSetData ($tab2Edit, "")
   EndSelect
EndFunc

and this

$tab=GUICtrlCreateTab (0,0,640,25)
GUICtrlSetOnEvent($tab,"OnTab")

1. is this correct for the code

2. where should it be so that it doesn't interfere with operation of other functions of the script

Here is a scheme for recognizing TAB selection clicks, It was given to me by @JPM or @JdeB.

;Begin TAB Section
    $PageControl1 = GUICtrlCreateTab(272, 152, 337, 193)
    
   ;Timings TAB
    $TabTimings = GUICtrlCreateTabItem("Timing")
    GUICtrlSetFont($TabTimings, $iFontSize, $iFontWt, 0, $sFontFace)

The code above shows the beginning of the TAB section

The code below shows how to determine which TAB was clicked.

While 1
    $msg = GUIGetMsg()
        
    If $msg = $PageControl1 Then
        $sVar = GUICtrlRead($PageControl1)
       ;MsgBox(0,"Information","Tab Index [" & $sVar & "] was clicked")
       ;if $sVar = 0 then MsgBox(0,"Information","Timing TAB was clicked")
        If $sVar = 0 Then $sHelpTopic = '"Timing Operation"'
       ;if $sVar = 1 then MsgBox(0,"Information","Settings TAB was clicked")
        If $sVar = 1 Then $sHelpTopic = '"StopLight Type; Stoplight location;Sound Volume"'
       ;if $sVar = 2 then MsgBox(0,"Information","Help TAB was clicked")
        If $sVar = 2 Then $sHelpTopic = '"Text Help"'
       ;if $sVar = 3 then MsgBox(0,"Information","License TAB was clicked")
        If $sVar = 3 Then $sHelpTopic = '"Conditions of Use"'
       ;if $sVar = 4 then MsgBox(0,"Information","Additions TAB was clicked")
        If $sVar = 4 Then $sHelpTopic = '"Add Names; Add Activities"'
        If $sVar = 5 Then
            $sDelNameList = IniRead($sSLT_INI_FullFilePath, "Names", "NameList", "")
            GUICtrlSetData($DelNamesBox, "")
            GUICtrlSetData($DelNamesBox, $sDelNameList)
            _BuildListView()
           ;MsgBox(0,"Information","Deletion TAB was clicked")
            $sHelpTopic = '"Delete Names; Delete Activities"'
        EndIf
        _SetHelpTopic()
    EndIf
        
Select
    Case $msg = $NewName

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

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