Bert Posted December 19, 2005 Share Posted December 19, 2005 I made a GUI to display a message. I needed the GUI to have a certain background color. Works fine. I wanted to do something with it and I'm not quite sure how. Here is the code for the GUI: $help_R = GUICreate("Help in Problem Ticket view", 445, 130) GUISetBkColor (0xE0FFFF) GUICtrlCreateLabel ("F1= Opens a help file showing the functions." & @CRLF _ & "F5= Refresh: This will refresh the current view." & @CRLF _ & "F6= Quick Paste: This will paste pre-determined text of your choice to fields." & @CRLF _ & "CTRL + ALT + X: Closes UNPlus, but leaves Unicenter ServiceDesk open" & @CRLF _ & "Print Scrn= Print Ticket: This will print your ticket to your default printer.", 5, 5, 440, 95) $button1 = GUICtrlCreateButton("OK", 185, 102, 60, 20) ; Run the GUI until it is closed GUISetState() What I like to do is where it says "F6", I would like to make that a variable so depending on how I have a setting in my INI file, the correct information would be displayed. If I have F7 in the INI, the message box would show F7. I remember seeing this done a while back, but I don't remember where. Is it like this?: "& $variable &" The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Valuater Posted December 19, 2005 Share Posted December 19, 2005 (edited) like this #Include <GUIConstants.au3> ; $var = iniread(..... $var = "F6" $help_R = GUICreate("Help in Problem Ticket view", 445, 130) GUISetBkColor (0xE0FFFF) GUICtrlCreateLabel ("F1= Opens a help file showing the functions." & @CRLF _ & "F5= Refresh: This will refresh the current view." & @CRLF _ & $var & "= Quick Paste: This will paste pre-determined text of your choice to fields." & @CRLF _ & "CTRL + ALT + X: Closes UNPlus, but leaves Unicenter ServiceDesk open" & @CRLF _ & "Print Scrn= Print Ticket: This will print your ticket to your default printer.", 5, 5, 440, 95) $button1 = GUICtrlCreateButton("OK", 185, 102, 60, 20) GUISetState() ; Run the GUI until it is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd 8) Edited December 19, 2005 by Valuater Link to comment Share on other sites More sharing options...
Bert Posted December 19, 2005 Author Share Posted December 19, 2005 I put it in. works great. Thanks! The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Valuater Posted December 19, 2005 Share Posted December 19, 2005 welcome 8) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now