Sign in to follow this  
Followers 0
marko001

adlibenable problem

3 posts in this topic

#1 ·  Posted (edited)

Hi all,

i tried, following your help, to solve it:

_loadsettings()
_checkfolders()
AdlibEnable("_checkconnection",20000)

while 1
...
wend

func _checkconnection()
    _checkgame1()
    _checkgame2(); same as _checkgame(1)
EndFunc 

func _checkgame1()
    if $controlforchecking1 = true Then
        _tcpsend(1,"/status")
        sleep(1000)
            $msg = TCPRecv($oSocket1, 1500)
        If StringInStr($msg, "True") Then
            _status(1,"Game is still up!")
        Else
            _status(1,"Game closed! Relogging...")
            $controlforchecking1 = False    
            GUICtrlSetData($g1start, "Game1")
            _Launch(1)
            _Start(1)
        EndIf
    EndIf
EndFunc

Both if i put the AdlibEnable out of the while or inside the while (after the select)

It won't simply run. (if i put it outside while it also gives me an error)

The error i get is this one:

...\GUICreate.au3 (351) : ==> Subscript used with non-Array variable.:

Case $msg[0]=$oSetup

Case $msg^ ERROR

>Exit code: 1 Time: 60.906

Can someone please help me?

Thanks,

Marco

Edited by marko001

Share this post


Link to post
Share on other sites



Hi all,

i tried, following your help, to solve it:

_loadsettings()
_checkfolders()
AdlibEnable("_checkconnection",20000)

while 1
...
wend

func _checkconnection()
    _checkgame1()
    _checkgame2(); same as _checkgame(1)
EndFunc 

func _checkgame1()
    if $controlforchecking1 = true Then
        _tcpsend(1,"/status")
        sleep(1000)
            $msg = TCPRecv($oSocket1, 1500)
        If StringInStr($msg, "True") Then
            _status(1,"Game is still up!")
        Else
            _status(1,"Game closed! Relogging...")
            $controlforchecking1 = False    
            GUICtrlSetData($g1start, "Game1")
            _Launch(1)
            _Start(1)
        EndIf
    EndIf
EndFunc

Both if i put the AdlibEnable out of the while or inside the while (after the select)

It won't simply run. (if i put it outside while it also gives me an error)

The error i get is this one:

...\GUICreate.au3 (351) : ==> Subscript used with non-Array variable.:

Case $msg[0]=$oSetup

Case $msg^ ERROR

>Exit code: 1 Time: 60.906

Can someone please help me?

Thanks,

Marco

You haven't shown the part of the script where the error occurs so helping you is reduced to guessing.

[guess1]

Have you used $msg for GuiGetMsg(1) and then used the same variable name for the return from TCPRecv?

[/guess]


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Solved thanks to your help!

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