Re: Re: gui message problems

"damien c. sadler" <[email protected]>
Newsgroups gmane.comp.windows.autoit.user
Message-ID <[email protected]>
this is almost the same as what i use, but because i'm visually impaired i find it hard to know what positions to put the gui on the screen, and this lbc.au3 library does it for me, so i'm using that, which is very similar to what you just did. i can't understand why it's stating that there's no wend statement when there is.

but as you can do gui positioning ok i'll try this method.

thanks.

regards,

damien


  ----- Original Message ----- 
  From: valery_vi 
  To: [email protected] 
  Sent: Monday, December 04, 2006 6:11 AM
  Subject: [AutoIt] Re: gui message problems


  This one works fine for me:

  #include <GUIConstants.au3>
  $hGUI = GUICreate("Test", 400, 300)

  $mm=GUICtrlCreateRadio("Music Machine", 10, 0, 100, 30)
  $wnit=GUICtrlCreateRadio("What Note Is This?", 10, 30, 100, 30)
  $simon=GUICtrlCreateRadio("Simon", 10, 60, 100, 30)
  $fkey=GUICtrlCreateRadio("fire key", 10, 90, 100, 30)
  $mbi=GUICtrlCreateRadio("musical bop it", 10, 120, 100, 30)
  $mbox=GUICtrlCreateRadio("music box", 10, 150, 100, 30)
  $ok=GUICtrlCreateButton("&ok", 10, 180, 100, 30)
  $ccl=GUICtrlCreateButton("e&xit", 10, 210, 100, 30)
  GUISetState()
  while 1
  $msg=guigetmsg()
  if $msg=$ccl or $msg=$gui_event_close then exit
  if $msg=$ok then read_choice()
  wend

  func read_choice()
  if guictrlread($mm)=$gui_checked then music_machine()
  if guictrlread($wnit)=$gui_checked then what_note_is_this()
  if guictrlread($simon)=$gui_checked then simon()
  if guictrlread($fkey)=$gui_checked then firekey()
  if guictrlread($mbi)=$gui_checked then musical_bop()
  if guictrlread($mbox)=$gui_checked then music_box()
  endfunc

  Valery

  --- In [email protected], "damien c. sadler" <necdet@...> 
  wrote:
  >
  > hi guys,
  > 
  > could you look at this code and tell me what the problem is? i 
  keep getting an error telling me that there's no wend statement when 
  i know there is:
  > btw i'm using jamal mazrui's layout by code library to help with 
  gui placement.
  > 
  > 
  > func prompt()
  > _LBCCreate("choose activity:")
  > $mm=_LBCCtrlCreateRadio("Music Machine")
  > $wnit=_LBCCtrlCreateRadio("What Note Is This?")
  > $simon=_LBCCtrlCreateRadio("Simon")
  > $fkey=_LBCCtrlCreateRadio("fire key")
  > $mbi=_LBCCtrlCreateRadio("musical bop it")
  > $mbox=_LBCCtrlCreateRadio("music box")
  > $ok=_LBCCtrlCreateButton("&ok")
  > $ccl=_LBCCtrlCreateButton("e&xit")
  > _LBCShow()
  > while 1
  > $msg=guigetmsg()
  > if $msg=$ccl or $msg=$gui_event_close then exit
  > if $msg=$ok then read_choice()
  > wend
  > endfunc
  > func read_choice()
  > if guictrlread($mm)=$gui_checked then music_machine()
  > if guictrlread($wnit)=$gui_checked then what_note_is_this()
  > if guictrlread($simon)=$gui_checked then simon()
  > if guictrlread($fkey)=$gui_checked then firekey()
  > if guictrlread($mbi)=$gui_checked then musical_bop()
  > if guictrlread($mbox)=$gui_checked then music_box()
  > endfunc
  > 
  > 
  > 
  > thanks.
  > 
  > regards,
  > 
  > damien
  > 
  > 
  > 
  > [Non-text portions of this message have been removed]
  >



   


[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.