Jump to content
Sign in to follow this  
zvd

GUINotifyMode

Recommended Posts

zvd

Hello, after updating the following script to the latest syntax, I get an unknown option or bad parameter specified for GUINotifyMode (line 4). If I comment it out, my script does not work as I'd like. GUINotifyMode is still an option in the help file though...

Global $GUI_SHOW = 16
Global $GUI_HIDE = 32
Global $GUI_CHECKED = 1
Opt ("GUINotifyMode", 1)
GUICreate("Domain Computer Account Tool", 290, 315, (@DesktopHeight - 315) / 2, (@DesktopHeight - 315) / 2, 0x04CF0000)
GUICtrlCreateLabel ("Username:", 20, 10)
GUICtrlCreateLabel ("Password:", 20, 60,)
GUICtrlCreateLabel ("Computer Name:", 20, 110)
GUICtrlCreateLabel ("Description/User:", 20, 160, 90)
$NINPUT = GUICtrlCreateInput ("", 20, 30, 250, 20)
$NINPUT2 = GUICtrlCreateInput ("", 20, 80, 250, 20, 0x0020)
$NINPUT3 = GUICtrlCreateInput ("", 20, 130, 250, 20)
$NINPUT4 = GUICtrlCreateInput ("", 20, 180, 250, 20)
$RADIO_1 = GUICtrlCreateRadio ("Add", 20, 215, 55, 13)
GuiCtrlSetState ($RADIO_1, $GUI_CHECKED)
$RADIO_2 = GUICtrlCreateRadio ("Remove", 77, 215, 66, 13)
$RADIO_3 = GUICtrlCreateRadio ("Modify", 155, 215, 56, 13)
$RADIO_4 = GUICtrlCreateRadio ("Query", 220, 215, 56, 13)
$RADIO_5 = GUICtrlCreateRadio ("Add/Join", 30, 240, 80, 13)
$RADIO_6 = GUICtrlCreateRadio ("Allow to Join", 110, 240, 80, 13)
$RADIO_7 = GUICtrlCreateRadio ("Move", 205, 240, 80, 13)
$NOK = GUICtrlCreateButton ("Send", 50, 270, 80, 20)
$NCANCEL = GUICtrlCreateButton ("Cancel", 150, 270, 80, 20)

GuiSetState ()
While 1
   
   $MSG = GuiGetMsg ()
   
   Select
      Case $MSG = -3
         Exit
      Case GUIRead() = $RADIO_7;allow to join
         If GUIRead($RADIO_7) = $GUI_CHECKED Then 
            GuiCtrlSetState ($NINPUT, $GUI_SHOW) 
            GuiCtrlSetState ($NINPUT2, $GUI_SHOW)
            GuiCtrlSetState ($NINPUT3, $GUI_SHOW)
            GuiCtrlSetState ($NINPUT4, $GUI_HIDE)
         EndIf     
      Case GUIRead() = $RADIO_6;allow to join
         If GUIRead($RADIO_6) = $GUI_CHECKED Then 
            GuiCtrlSetState ($NINPUT, $GUI_SHOW) 
            GuiCtrlSetState ($NINPUT2, $GUI_SHOW)
            GuiCtrlSetState ($NINPUT3, $GUI_SHOW)
            GuiCtrlSetState ($NINPUT4, $GUI_SHOW)
         EndIf     
         
      Case GUIRead() = $RADIO_5;add/join
         If GUIRead($RADIO_5) = $GUI_CHECKED Then 
            GuiCtrlSetState ($NINPUT, $GUI_SHOW) 
            GuiCtrlSetState ($NINPUT2, $GUI_SHOW)
            GuiCtrlSetState ($NINPUT3, $GUI_SHOW)
            GuiCtrlSetState ($NINPUT4, $GUI_SHOW)
         EndIf     
      Case GUIRead() = $RADIO_4;query
         If GUIRead($RADIO_4) = $GUI_CHECKED Then 
            GuiCtrlSetState ($NINPUT, $GUI_HIDE) 
            GuiCtrlSetState ($NINPUT2, $GUI_HIDE)
            GuiCtrlSetState ($NINPUT4, $GUI_HIDE)
         EndIf     
      Case GUIRead() = $RADIO_3;modify
         If GUIRead($RADIO_3) = $GUI_CHECKED Then 
            GuiCtrlSetState ($NINPUT, $GUI_SHOW) 
            GuiCtrlSetState ($NINPUT2, $GUI_SHOW)
            GuiCtrlSetState ($NINPUT3, $GUI_SHOW)
            GuiCtrlSetState ($NINPUT4, $GUI_SHOW)
         EndIf
      Case GUIRead() = $RADIO_2;remove
         If GUIRead($RADIO_2) = $GUI_CHECKED Then 
            GuiCtrlSetState ($NINPUT, $GUI_SHOW) 
            GuiCtrlSetState ($NINPUT2, $GUI_SHOW)
            GuiCtrlSetState ($NINPUT4, $GUI_HIDE)
         EndIf
      Case GUIRead() = $RADIO_1;add
         If GUIRead($RADIO_1) = $GUI_CHECKED Then 
            GuiCtrlSetState ($NINPUT, $GUI_SHOW) 
            GuiCtrlSetState ($NINPUT2, $GUI_SHOW)
            GuiCtrlSetState ($NINPUT3, $GUI_SHOW)
            GuiCtrlSetState ($NINPUT4, $GUI_SHOW)
         EndIf   
      Case GUIRead() = $NOK
         If GUIRead($RADIO_1) = $GUI_CHECKED Then add()
         If GUIRead($RADIO_2) = $GUI_CHECKED Then remove()
         If GUIRead($RADIO_3) = $GUI_CHECKED Then modify()
         If GUIRead($RADIO_4) = $GUI_CHECKED Then query()
         If GUIRead($RADIO_5) = $GUI_CHECKED Then addjoin()
         If GUIRead($RADIO_6) = $GUI_CHECKED Then join()
         If GUIRead($RADIO_7) = $GUI_CHECKED Then move()
         
      Case GUIRead() = $NCANCEL
         Exit
         
   EndSelect
Wend
Edited by Larry

Share this post


Link to post
Share on other sites
jpm

a complete renaming/splitting of all functions as occur so you need to read the doc and change your script CyberSlug made a first level translator you can use. See gui conversion tool

Share this post


Link to post
Share on other sites
this-is-me

All controls now notify. You don't have to have GUINotifyMode any more.


Who else would I be?

Share this post


Link to post
Share on other sites
zvd

I figured it out. Removed Opt ("GUINotifyMode", 1) and replaced Case GUIRead() = with Case $msg =

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  

×