Jump to content

scsicard65

Members
  • Posts

    5
  • Joined

  • Last visited

scsicard65's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hello is there a way to have the random number that is generated not create the mkk.text but to have it open up to a label somethig that that can be cut and pasted or copied after the number is generated. Func _GenRandomId() $RANDOM = Random(100, 999, 1) If StringInStr(FileRead("mkk.txt"), "" & $RANDOM) then return msgbox(64, "Number ID", Random(100, 999, 1)) else return msgbox(64, "Number ID", $RANDOM) EndIf EndFunc $TIMER = TimerInit() While 1 If TimerDiff($TIMER) > 10000 then Exit _GenRandomId() WEnd
  2. GUICtrlSetData (-1, "2|3|4|5|2|3") is the data I'm trying to display in red thanks.
  3. I did try GUICtrlSetColor and GUICtrlSetBkColor, I can get the bkcolor to change to red just not the number of the output
  4. I want to change the color of these numbers 2 3 4 5 GUICtrlSetData(-1, "2|3|4|5|2|3")
  5. I have an example script that outputs numbers. It works fine, what I would like to do is change the color of the numbers in the output box. What I would like is the numbers 2,3,4,5,2,3 to appear red. I have also tried the command GUICtrlSetColor(-1, 0x0000FF) to set the color and it does'nt work. Any feed back woruld be great thanks. Here is the script #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiComboBoxEx.au3> $Form1 = GUICreate("Form1", 197, 66, 192, 124) $Label1 = GUICtrlCreateLabel("Choose number:", 10, 12, 93, 17) $Combo1 = GUICtrlCreateCombo("Choose here...", 106, 10, 81, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "2|3|4|5|2|3") $Button1 = GUICtrlCreateButton("Start", 50, 32, 97, 25) Global $file = FileOpen('c:\ChangeMe.txt', 0) GUISetState(@SW_SHOW) While 1 $chosen = GUICtrlRead($Combo1) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $chosen = GUICtrlRead($Combo1) Switch $chosen Case "2" Case "3" Case "4" Case "5" Case "2" Case "3" EndSwitch Endswitch WEnd
×
×
  • Create New...