Jump to content
Sign in to follow this  
gcue

$BS_ICON and CBS_DROPDOWNLIST not working with 3.2.12.0?

Recommended Posts

gcue

these styles dont seem to be working with 3.2.12.0 can anyone confirm?

they worked fine in 3.2.10.0

(no code changes)

i know about the RunAs change but I'm not using that anywhere

Opt("GUIOnEventMode", 1)

#include <GUIConstants.au3>

#Include <Constants.au3>

#include <file.au3>

Global $toolsdir, $filemenu, $filemenuopenitem, $filemenuexititem, $helpmenu, $changeitem, $helpitem, $contextmenu, $BS_ICON, $iplist, $CBS_DROPDOWNLIST

$toolsdir="C:\CRS\Tools"

If Not FileExists($toolsdir) Then

DirCreate($toolsdir)

EndIf

If Not FileExists($toolsdir & "\Dashboard") Then

DirCreate($toolsdir & "\Dashboard")

EndIf

Global $Ini = $toolsdir & "\Dashboard\settings.ini"

If Not FileExists($Ini) Then

MsgBox(262144, "Dashboard", "Settings.ini is missing. A generic one has been created for you.")

IniWrite($Ini, "LOCATIONS", "CRMC","CRMC_ASSETS")

IniWrite($Ini, "LOCATIONS", "GIG","GIG_ASSETS")

IniWrite($Ini, "LOCATIONS", "DR","DR_ASSETS")

_FileWriteToLine($Ini, 5, "", 0)

IniWrite($Ini, "CRMC_ASSETS", "ANDS_ETP","D0090774")

_FileWriteToLine($Ini, 9, "", 0)

IniWrite($Ini, "GIG_ASSETS", "ANDS_ESR","D0090775")

_FileWriteToLine($Ini, 13, "", 0)

IniWrite($Ini, "DR_ASSETS", "DLG_ETP","D0049852")

ShellExecute($Ini)

EndIf

GUICreate("Dashboard v0.1", 520, 430)

GUISetBkColor (0xffffff)

$filemenu = GUICtrlCreateMenu("&File")

$fileopenitem = GUICtrlCreateMenuItem("Edit Asset List", $filemenu)

GUICtrlSetOnEvent(-1,"EditINI")

$fileexititem = GUICtrlCreateMenuItem("Exit", $filemenu)

GUICtrlSetOnEvent(-1,"Xbutton")

$helpmenu = GUICtrlCreateMenu ("&Help")

$changeitem = GUICtrlCreateMenuitem ("Change Log",$helpmenu)

GUICtrlSetOnEvent(-1,"Change")

$helpitem = GUICtrlCreateMenuitem ("About",$helpmenu)

GUICtrlSetOnEvent(-1,"About")

$contextmenu = GUICtrlCreateContextMenu ()

$combo = GUICtrlCreateCombo("Select Location...", 290, 5, 200, 20, $CBS_DROPDOWNLIST)

GUICtrlSetData(-1, LoadCombo(), "Location...")

Func LoadCombo()

Local $arr = IniReadSection($Ini, "LOCATIONS"), $Local

If Not @error Then

For $i = 1 To $arr[0][0]

$Local &= $arr[$i][0] & "|"

Next

Return StringTrimRight($Local, 1)

EndIf

Return "No assets loaded"

EndFunc ;==>LoadCombo

$ButHeight = 40

$ButWid = 40

$horPitch = $ButWid + 45

$horPitch = $ButWid + 45

$VertPItch = $ButHeight + 30

$maxX = 470;depends on your window size or whatever

$maxY = 380;ditto

$startX = 5

$StartY = 0

$ButCount = 0;no buttons yet

$ButHor = 6

$ButVert = 0

Func CreateIcons()

Global $iplist[20]

$LOCS = IniReadSection($ini, "LOCATIONS")

For $i = 1 To $LOCS[0][0]

$PC_Btns = IniReadSection($ini, $LOCS[$i][1])

For $x = 1 To $PC_Btns[0][0]

$ButCount += 1

$ButHor += 1

If $ButHor * $horPitch + $ButWid + $startX > $maxX Then

$ButHor = 0

$ButVert += 1

If $ButVert * $VertPItch + $ButHeight + $StartY > $maxY Then Return -1;can't fit any more

EndIf

$buttemp=GUICtrlCreateButton($PC_Btns[$x][0], $startX + $ButHor * $horPitch, $StartY + $ButVert * $VertPItch, $ButWid, $ButHeight, $BS_ICON)

GUICtrlSetImage(-1, "shell32.dll", 16)

GUICtrlCreateLabel($PC_Btns[$x][0], $startX + $ButHor * $horPitch, $StartY + $ButVert * $VertPItch + $ButHeight + 6)

GUICtrlSetOnEvent($buttemp, "UNC")

If UBound($iplist) < $buttemp Then ReDim $iplist[$buttemp + 5]

$iplist[$buttemp] = $PC_Btns[$x][1]

$Btn_context = GUICtrlCreateContextMenu($buttemp)

$Btn_context_item = GUICtrlCreateMenuItem("Take Remote Screenshot", $Btn_context)

GUICtrlSetOnEvent(-1,"About")

$Btn_context_item = GUICtrlCreateMenuItem("Manage", $Btn_context)

GUICtrlSetOnEvent(-1,"Manage")

$Btn_context_item = GUICtrlCreateMenuItem("Netsupport", $Btn_context)

GUICtrlSetOnEvent(-1,"Xbutton")

$Checkers_menu = GUICtrlCreateMenu("Checkers", $Btn_context)

$Checkers_menu_item = GUICtrlCreateMenuItem("Bloomberg Info", $Checkers_menu)

GUICtrlSetOnEvent(-1,"Change")

$Checkers_menu_item = GUICtrlCreateMenuItem("Reuters Info", $Checkers_menu)

GUICtrlSetOnEvent(-1,"Change")

$Checkers_menu_item = GUICtrlCreateMenuItem("Novell Broadcast Setting", $Checkers_menu)

GUICtrlSetOnEvent(-1,"Change")

$Checkers_menu_item = GUICtrlCreateMenuItem("Exclusion Variable", $Checkers_menu)

GUICtrlSetOnEvent(-1,"Change")

$Checkers_menu_item = GUICtrlCreateMenuItem("Active Processes", $Checkers_menu)

GUICtrlSetOnEvent(-1,"Change")

$Checkers_menu_item = GUICtrlCreateMenuItem("Encryption Status", $Checkers_menu)

GUICtrlSetOnEvent(-1,"Change")

$Checkers_menu_item = GUICtrlCreateMenuItem("MAC and HD Serial", $Checkers_menu)

GUICtrlSetOnEvent(-1,"Change")

$Checkers_menu_item = GUICtrlCreateMenuItem("Uptime", $Checkers_menu)

GUICtrlSetOnEvent(-1,"Change")

$Checkers_menu_item = GUICtrlCreateMenuItem("Security", $Checkers_menu)

GUICtrlSetOnEvent(-1,"Change")

$get_menu = GUICtrlCreateMenu("Get Logs", $Btn_context)

$get_menu_item = GUICtrlCreateMenuItem("ETP", $get_menu)

GUICtrlSetOnEvent(-1,"Change")

$get_menu_item = GUICtrlCreateMenuItem("Channel", $get_menu)

GUICtrlSetOnEvent(-1,"Change")

$get_menu_item = GUICtrlCreateMenuItem("Liquidnet", $get_menu)

GUICtrlSetOnEvent(-1,"Change")

$get_menu_item = GUICtrlCreateMenuItem("LAVA", $get_menu)

GUICtrlSetOnEvent(-1,"Change")

$get_menu_item = GUICtrlCreateMenuItem("Pipeline", $get_menu)

GUICtrlSetOnEvent(-1,"Change")

Next

Next

EndFunc ;==>CreateIcons

CreateIcons()

;========== begin window context menu =============

$file_window_context_menu = GUICtrlCreateMenu("File",$contextmenu)

$file_window_context_menu_item = GUICtrlCreateMenuItem("Edit Asset List", $file_window_context_menu)

GUICtrlSetOnEvent(-1,"EditINI")

$file_window_context_menu_item = GUICtrlCreateMenuItem("Exit", $file_window_context_menu)

GUICtrlSetOnEvent(-1,"Xbutton")

$checkers_window_context_menu = GUICtrlCreateMenu("<Location> Checkers",$contextmenu)

$checkers_window_context_menu_item = GUICtrlCreateMenuItem("Bloomberg", $checkers_window_context_menu)

GUICtrlSetOnEvent(-1,"Change")

$checkers_window_context_menu_item = GUICtrlCreateMenuItem("Reuters", $checkers_window_context_menu)

GUICtrlSetOnEvent(-1,"About")

$checkers_window_context_menu_item = GUICtrlCreateMenuItem("Novell Broadcast Setting", $checkers_window_context_menu)

GUICtrlSetOnEvent(-1,"Change")

$checkers_window_context_menu_item = GUICtrlCreateMenuItem("Exclusion Variable", $checkers_window_context_menu)

GUICtrlSetOnEvent(-1,"Change")

$checkers_window_context_menu_item = GUICtrlCreateMenuItem("Active Processes", $checkers_window_context_menu)

GUICtrlSetOnEvent(-1,"Change")

$checkers_window_context_menu_item = GUICtrlCreateMenuItem("Encryption Status", $checkers_window_context_menu)

GUICtrlSetOnEvent(-1,"Change")

$checkers_window_context_menu_item = GUICtrlCreateMenuItem("MAC and HD Serial", $checkers_window_context_menu)

GUICtrlSetOnEvent(-1,"Change")

$checkers_window_context_menu_item = GUICtrlCreateMenuItem("Uptime", $checkers_window_context_menu)

GUICtrlSetOnEvent(-1,"Change")

$checkers_window_context_menu_item = GUICtrlCreateMenuItem("Security", $checkers_window_context_menu)

GUICtrlSetOnEvent(-1,"Change")

;========== end window context menu =============

GUICtrlCreateLabel("STATUS:", 5, 360)

GUICtrlCreateLabel("Idle. ", 5, 380)

GUICtrlSetFont (-1,7, 600)

GUISetOnEvent($GUI_EVENT_CLOSE, "Xbutton")

GUISetState ()

While 1

sleep(10)

Wend

Func UNC()

$asset = $iplist[@GUI_CtrlId]

Ping($asset)

If @error Then

MsgBox(0, "Dashboard", $asset & " is offline.")

Else

GUICtrlCreateLabel("Opening " & $asset & " ", 5, 380)

GUICtrlSetFont(-1, 7, 600)

Run(@WindowsDir & "\explorer.exe " & "\\" & $asset & "\c$")

GUICtrlCreateLabel("Idle. ", 5, 380)

GUICtrlSetFont(-1, 7, 600)

EndIf

EndFunc ;==>UNC

Func Manage()

$asset = $iplist[@GUI_CtrlId]

Ping($asset)

If @error Then

MsgBox(0, "Dashboard", $asset & " is offline.")

Else

GUICtrlCreateLabel("Opening " & $asset & " ", 5, 380)

GUICtrlSetFont(-1, 7, 600)

Run(@ComSpec & " /c compmgmt.msc /computer=" & $asset)

GUICtrlCreateLabel("Idle. ", 5, 380)

GUICtrlSetFont(-1, 7, 600)

EndIf

EndFunc ;==>Manage

Func EditINI()

ShellExecuteWait($Ini)

GUICTrlSetdata($combo,"")

GUICTrlSetdata($combo, "Select Asset...|" & LoadCombo(), "Select Asset...")

EndFunc ;==>EditINI

Func Change()

MsgBox(262144, "Dashboard v0.1", 'Change Log'&@CRLF & _

''&@CRLF & _

'No Changes'&@CRLF & _

''&@CRLF & _

'Please contact GXM x90760 for suggestions or bug reports.')

EndFunc ;==>Change

Func About()

MsgBox(64, "About", 'Dashboard v0.1'&@CRLF & _

''&@CRLF & _

'Launchpad for '&@CRLF & _

''&@CRLF & _

'1.'&@CRLF & _

'2.'&@CRLF & _

'3. '&@CRLF & _

'4.'&@CRLF & _

''&@CRLF & _

'Contact GXM x90760 for questions/suggestions.')

EndFunc ;==>About

Func Xbutton()

Exit

EndFunc ;==>Xbutton

Share this post


Link to post
Share on other sites
Jos

What error do you get ?

Have you read the change log section, particularly the top section?

Have you read this thread? http://www.autoitscript.com/forum/index.php?showtopic=70902

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.