Sign in to follow this  
Followers 0
datkewlguy

GUI exit button

2 posts in this topic

i need to add it to this script

Opt ("TrayIconHide", 1)

HotKeySet("{F11}", "myexit")

#include <GUIConstants.au3>
InetGet ( "http://www.olentangy.k12.oh.us/cancel.html?aolfix", "schoolstatus.txt", 1)

GUICreate("School Status", 180, 130, 450, 200)
GUISetBkColor(0xFFFFFF)
GUISetState(@Sw_SHOW)

If FoundInFile("schoolstatus.txt", "hour delay") Then
DllCall("kernel32.dll", "int", "Beep", "long", 600, "long", 350)
EndIf

If FoundInFile("schoolstatus.txt", "closed") Then
DllCall("kernel32.dll", "int", "Beep", "long", 600, "long", 350)
EndIf

Func FoundInFile($File, $String)
   Local $Found
   Local $Content
   Local $FileSize
   If NOT FileExists($File) Then Return 0
   $FileSize = FileGetSize($File)
   $Content = FileRead($File, $FileSize)
   $Found = StringInStr($Content, $String)
   $Content = ""
   If $Found Then Return 1
   Return 0
EndFunc

While 1
  InetGet ( "http://www.olentangy.k12.oh.us/cancel.html?aolfix", "schoolstatus.txt", 1)
  If FoundInFile("schoolstatus.txt", "hour delay") Then
    $label = GUICtrlCreateLabel("Schools are delayed", 55, 55, 70, 25)
  EndIf
  If FoundInFile("schoolstatus.txt", "closed") Then
    $label = GUICtrlCreateLabel("Schools are closed", 55, 55, 70, 25)
  endif
  sleep(500)
WEnd

Func myexit()
exit
endfunc

Share this post


Link to post
Share on other sites



i have

$exitbtn = GUICtrlCreateButton("EXIT", 55, 90, 70, 25)

i just need to set the function for when pressed, but i forgot how...

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