Jump to content

Script working while the compiled isn't

Recommended Posts

AutoIT Version:

OS: Windows 7 x64

I've written the following script:

Func main()

Local $IPAddress = ""
Local $recv = ""

;~ Inicialização
$Socket = TCPConnect($IPAddress, 23)

;~ Usuário
AguardaString($Socket, "username:")
EnviaComando($Socket, "user")

;~ Senha
AguardaString($Socket, "password:")
EnviaComando($Socket, "password")

;~ Comando de reinicialização
AguardaString($Socket, "TBS>>")
EnviaComando($Socket, "reboot")

;~ Finalização
EndFunc   ;==>main

Func AguardaString(Const $Socket, Const $string)
$recv = TCPRecv($Socket, 500)
Until StringInStr($recv, $string)
EndFunc   ;==>AguardaString

Func EnviaComando(Const $Socket, Const $comando)
TCPSend($Socket, $comando & @CR)
EndFunc   ;==>EnviaComando

When I hit F5 in SciTE the program works properly. I tried to compile it to both x86 and x64 version, they do not work.

Sometimes the autoit icon appears, but the result does not happen.

When I put a MsgBox function right after the reboot command, the .exe works.

What's happening?

Edited by TheGeneral
Link to comment
Share on other sites


But I recommend posting your scripts in English, since the native language here is this!

Have you tried compiling your script with the previous version?

If you wish, sign up here: http://autoitbrasil.com


João Carlos.

Edited by jscript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram


dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

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

  • Create New...