Sign in to follow this  
Followers 0
ghostofdeath

need help on a simple script

6 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

#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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

oh thx for the tip :D maybe with the new beta i dun get lots of problems.. i need tomake like 30 items i tihk i wont have more problmes now ^^ thx man

Share this post


Link to post
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

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  
Followers 0