Jump to content

Erasing old bullets in favor of new


Alterego
 Share

Recommended Posts

I'd like to have a menu such that you can choose alternate processor priorities, and having done so the one you just chose is bulleted and any others that may have been bulleted in the past no longer are. Here's the relevant code i'm trying. Basically it doesn't work and it bullets every item every time you select it :lmao:

$options = GuiCtrlCreateMenu("Options",-1, 1)
$processor = GuiCtrlCreateMenu("Processor Priority",$options)
$priority1 = GuiCtrlCreateMenuItem("Below Normal (Suggested)",$processor,0,1)
$priority2 = GuiCtrlCreateMenuItem("Normal",$processor,1,1)
$priority3 = GuiCtrlCreateMenuItem("Above Normal",$processor,2,1)
$priority4 = GuiCtrlCreateMenuItem("High",$processor,4,1)

GuiSetState()
While 1
$msg = GUIGetMsg()
If $msg = $priority1 OR $priority2 OR $priority3 OR $priority4 Then 
       GUICtrlSetState($msg,$GUI_CHECKED)
       For $x = 1 to 4
           $y = StringSplit($priority1 & "," & $priority2 & "," & $priority3 & "," & $priority4,",")
           If $y <> $msg Then
             GUICtrlSetState($y[$x],$GUI_UNCHECKED) 
           EndIf
       Next    
   EndIf   
Wend

Seems like it should cycle through the four and make sure they aren't checked

Link to comment
Share on other sites

  • Developers

I'd like to have a menu such that you can choose alternate processor priorities, and having done so the one you just chose is bulleted and any others that may have been bulleted in the past no longer are. Here's the relevant code i'm trying. Basically it doesn't work and it bullets every item every time you select it  :lmao:

Seems like it should cycle through the four and make sure they aren't checked

<{POST_SNAPBACK}>

this line is wrong:

If $msg = $priority1 OR $priority2 OR $priority3 OR $priority4 Then
should be:
If $msg = $priority1 OR $msg = $priority2 OR $msg = $priority3 OR $msg = $priority4 Then

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...