Jump to content

need help on a simple script


Recommended Posts

hello guys... i m gettin a big problem here..

this is my script:

#include <GUIConstants.au3>
GUICreate("DotA Database 0.1 BETA",800,500)
GUISetState (@SW_SHOW)
$tab=GUICtrlCreateTab (10,10,300,25)
$tab0=GUICtrlCreateTabitem ("Items/ETC")
$list=GuiCtrlCreateList("",10,100,200,100)
$it1="Ancient Tango of Essifation"
GuiCtrlSetData(-1,$it1)
GUICtrlCreateTabitem ("")
$label=GuiCtrlCreateLabel("",400,40,150,25)
$local=GUICtrlCreateLabel("",350,100,120,40)
$text=GUICtrlCreateLabel("",350,150)
While 1
    $msg = GUIGetMsg()
    $read=GUICtrlRead($list)
    Select
    Case $read="Ancient Tango of Essifation"
    GUICtrlSetData($label,"Ancient Tango of Essifation")
    GUICtrlCreatePic("items632/BTNAncientOfTheEarth.gif",350,40,40,40)
    GUICtrlSetData($local,"Chimaera Roost/Graveyard")
    EndSelect
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

my problem is..how to make the $read dun stopping read the list.. cause if I put the read in that while i have to create my select case here to.. and if i do this.. it wont stop creating the things, i tried exitloop but it just close my GUI..anyone got an idea? :D thanks

Link to comment
Share on other sites

#include <GUIConstants.au3>
GUICreate("DotA Database 0.1 BETA",800,500)
GUISetState (@SW_SHOW)
$tab=GUICtrlCreateTab (10,10,300,25)
$tab0=GUICtrlCreateTabitem ("Items/ETC")
$list=GuiCtrlCreateList("",10,100,200,100)
$it1="Ancient Tango of Essifation"
GuiCtrlSetData(-1,$it1)
GUICtrlCreateTabitem ("")
$label=GuiCtrlCreateLabel("",400,40,150,25)
$local=GUICtrlCreateLabel("",350,100,120,40)
$text=GUICtrlCreateLabel("",350,150)
While 1
    $msg = GUIGetMsg()
   Switch $msg 
      case 0
         sleep(200)
      case $GUI_EVENT_MOUSEMOVE

      case $GUI_EVENT_CLOSE 
         ExitLoop
      case $list 
         ReadList()
      Case else 
         ConsoleWrite("$msg:=" & $msg & @LF)
   Endswitch
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
Exit
Func ReadList()
   ConsoleWrite("ReadList" & @LF)
    $read=GUICtrlRead($list)
    Select
    Case $read="Ancient Tango of Essifation"
    GUICtrlSetData($label,"Ancient Tango of Essifation")
    GUICtrlCreatePic("items632/BTNAncientOfTheEarth.gif",350,40,40,40)
    GUICtrlSetData($local,"Chimaera Roost/Graveyard")
    EndSelect   
EndFunc

Edited by Uten
Link to comment
Share on other sites

>"C:\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\Usuário\Desktop\dota\asd.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams

>Running AU3Check params: from:C:\AutoIt3\SciTE\au3check\

+>AU3Check ended.rc:0

>Running:(3.1.1.0):C:\AutoIt3\autoit3.exe "C:\Documents and Settings\Usuário\Desktop\dota\asd.au3"

C:\Documents and Settings\Usuário\Desktop\dota\asd.au3 (16) : ==> "Case" statement with no matching "Select" statement.:

case 0

->AutoIT3.exe ended.rc:1

>Exit code: 1 Time: 2.605

your script uten

edit~~ i dun have this switch command in my au3 o_O

Edited by ghostofdeath
Link to comment
Share on other sites

I have found the beta stable enough to skip the prod version entirely. I do a backup of the environment when I release a important utility thought, so I can get back and compile it in the version it was written. but really it has not been a problem, and the developers of AutoIt are normally on the alert and releasing new versions very fast if something important got screwed in a release.

Happy Coding :D

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