Jump to content

Do ... Until 2nd case pressed ?


Wheebo
 Share

Recommended Posts

This is a simple Script for sending Sentences or words out of a Input box .

The Problem is that i want the script to repeat the "Send" until the exit button ( or stop button ) is clicked, but the ways i tried out till now didnt work...

Here the Code :

SoundPlay(@scriptdir & "\fix\an.wma")

GUICreate("FFXI-Shouter by Wheebo",300,120,-1,-1,-1,$WS_EX_TOOLWINDOW)
GUISetState(@sw_show)
GUICtrlCreateLabel("Text zum Shouten eingeben :",10,10)
$input = GUICtrlCreateInput("/sh ", 10, 30, 280)
GUICtrlCreateLabel("Startet den Shout",15,60)
$shout = GUICtrlCreateButton("Start Shouting",10,80,120,30)
GUICtrlCreateLabel("Zeitabstand der Shouts",175,60)
$time = GUICtrlCreateButton("Shout Intervall setzen",170,80,120,30)
$exit = GUICtrlCreateButton("Exit",130,80,40,30)

While 1
    $nMsg = GUIGetMsg()
  Switch $nMsg
    Case $GUI_EVENT_CLOSE
      Exit
    
    Case $exit
      WinSetTrans("FFXI-Shouter  by Wheebo","", 0)
      ToolTip("Closing FFXI-Shouter",500,500,"Exit",3)
      Sleep(2000)
      Exit
 
    Case $shout
        MsgBox(64,"Start", "ShoutStart in 6 sekunden" & @crlf & "Bitte FFXI Maximieren")
        ToolTip("6 Sekunden",500,500,"StartShout in :")
        Sleep(1000)
        ToolTip("5 Sekunden",500,500,"StartShout in :")
        Sleep(1000)
        ToolTip("4 Sekunden",500,500,"StartShout in :")
        Sleep(1000)
        ToolTip("3 Sekunden",500,500,"StartShout in :")
        Sleep(1000)
        ToolTip("2 Sekunden",500,500,"StartShout in :")
        Sleep(1000)
        ToolTip("1 Sekunden",500,500,"StartShout in :")
        Sleep(1000)
        ToolTip(" ",500,500,"Shouting!")
        Sleep(1000)
        Do
        Send("{SPACE}")
        Sleep(1000)
        Send(GUICtrlRead($input))
        Sleep(1500)
        Send("{ENTER}")
        Sleep(1000)
        Until $exit
    EndSwitch
WEnd

How can i handle this Problem ? It actually "sends" the input data once and then just does nothing.

Please assist :)

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