Jump to content

Overlay


Go to solution Solved by MaxMeyer123,

Recommended Posts

i already wrote the "structure" of it i just need help with the overlay heres the code + result (msg box for testing)

#RequireAdmin
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GDIPlus.au3>
#include "includes/Pyload_Selfmade.au3"
#include "includes\_FB_Tools_api.au3"
#include "includes\_FB_Tools.au3"
#include "includes\GetWlanState_Selfmade.au3"
Global $Logpathov = FileOpen(@ScriptDir & "\Overlay.log", 2)
LoginFB()
Func LoginFB()
   If _FB_Init() = 0 Then
         _FileWriteLog($Logpathov, "FB | Init failed")
        Exit
    Else
        _FileWriteLog($Logpathov, "FB | Init OK")
    EndIf
    ;now log in
    If _FB_LogIn() = 0 Then;log in to the fritzbox and generate a new sid
        _FileWriteLog($Logpathov, "FB | Login failed")
        Exit
    Else
        _FileWriteLog($Logpathov, "FB | Login OK. Current SID is " & _FB_getSID())
    EndIf
    ;are we logged in?
    If _FB_IsLoggedIn() Then
        _FileWriteLog($Logpathov, "FB | Login OK, running login Pyload")
        Loginpy()
    Else
        _FileWriteLog($Logpathov, "FB | Login failed.")
     EndIf
     _FileWriteLog($Logpathov, "FB | Shutdown")
    _FB_shutdown()

 EndFunc ;==> LoginFB

Func LoginPY()
   If _py_Connect() = 1 Then
      Global $PyConnected = 1
   Else
      Global $PyConnected = 0
   EndIf
   Overlay()
EndFunc ;==> LoginPY

Func Overlay()
If $PyConnected = 0 Then
$OvText = _FB_GetWLAN()
Endif
If $Pyconnected = 1 and _PY_GetDLStatus() = 1 Then
$OvText = _FB_GetWLAN() & @CRLF & "Pyload an" & @CRLF & _PY_DLSpeed()
Else
$OvText = _FB_GetWLAN() & @CRLF & "NAS AN"
Endif
MsgBox(1,"", $OvText)
EndFunc
 

Result 

el4st4f4y23h.png

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