marko001 Posted April 7, 2008 Share Posted April 7, 2008 (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 April 7, 2008 by marko001 Link to comment Share on other sites More sharing options...
martin Posted April 7, 2008 Share Posted April 7, 2008 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, MarcoYou 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. Link to comment Share on other sites More sharing options...
marko001 Posted April 7, 2008 Author Share Posted April 7, 2008 Solved thanks to your help! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now