Sign in to follow this  
Followers 0
Glyph

What would make this GUI freeze?

3 posts in this topic

#include <GuiConstants.au3>
$read1 = IniRead("BSScroll.ini","Message","0","No .ini file!")
$read2 = IniRead("BSScroll.ini","Time","1","1234")
$read3 = IniRead("BSScroll.ini","Start","2","{Home}")
$read4 = IniRead("BSScroll.ini","End","3","{end}")
$start = HotKeySet(""&$read3,"_starts")
$stop =HotKeySet(""&$read4,"_Stops")

GuiCreate("BSScroll - Private Release v0.1", 400, 200,(@DesktopWidth-400)/2, (@DesktopHeight-200)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$filemenu = GuiCtrlCreateMenu ("File")
$saveitem = GuiCtrlCreateMenuitem ("Save and Reload",$filemenu)
$exititem = GuiCtrlCreateMenuitem ("Exit",$filemenu)
$helpmenu = GuiCtrlCreateMenu ("Help")

$aboutitem = GuiCtrlCreateMenuitem ("About",$helpmenu)
;pics
GUICtrlCreatePic("Text.gif",5,105,75,25)
GUICtrlCreatePic("Time.gif",5,55,75,25)
GUICtrlCreatePic("Endk.gif",85,5,75,25)
GUICtrlCreatePic("Startk.gif",5,5,75,25)
GUICtrlCreatePic("bslogo.gif",225,5,166,104)
$Savebtn= GUICtrlCreateButton("Save and Reload",245,109,120,25)

dim $input[4]
$Input[0] = GUICtrlCreateInput(""&$read1,5,125,75,25)
$Input[1] = GUICtrlCreateInput(""&$read2,5,75,75,25)
$Input[2] = GUICtrlCreateInput(""&$read3,5,25,75,25)
$Input[3] = GUICtrlCreateInput(""&$read4,85,25,75,25)
Dim $dwy[4] = ['Message','Time','Start','End']

GUISetBkColor("0x000000")
GuiSetState()
;struc
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    case $msg = $savebtn
        Save()
        Case $msg = $exititem
            ExitLoop
        Case $msg = $aboutitem
            Msgbox(0,"About","Made by: Backstabbed@USEast"&@crlf&"Downloaded from: Http://www.bsed.somee.com"&@crlf&"Check for updates!")
        Case $msg = $saveitem
            save()
    EndSelect
WEnd

Func Save()    
            For $i = 0 To 3
                IniWrite( @ScriptDir & '\BSScroll.ini', $dwy[$i],$i, GUICtrlRead($input[$i]))           
            Next 

_Message()
Exit
EndFunc
        

Func _message()
        If WinActive("BSScroll - Private Release v0.1") Then
        WinClose("BSScroll - Private Release v0.1")
        Run("BSS.exe","")
    EndIf

Exit
        
        
        
    EndFunc
    
Func _Starts()
    _test()
While 1
sleep(1)
WEnd
EndFunc
    
func _test()
while 1
    sleep($read2)
    Send("{enter}")
    Send ($read1)
    Send("{enter}")
        if @HotKeyPressed = $read4 Then
        ExitLoop
        EndIf
WEnd

EndFunc
        
Func _Stops()
        Send("{enter}")
        Send("{enter}")
        Send ("Stopped.")
        Send("{enter}")
EndFunc


tolle indicium

Share this post


Link to post
Share on other sites



Hi,

maybe this

While 1

sleep(1)

WEnd

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Thank you!


tolle indicium

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