Jump to content

about interactive server


Recommended Posts

hey there! I am still here! :guitar:

now, always knowing autoit isn't multi-threads, I need if it is possible to create a server application which permits the administrator to read what it's happening on the server, and send commands to it at the same time.

I think it isn't so easy but I would know if it's possible.

actually I'm using a console script, I appreciate a support about a GUI as well.

thank you so much for your answers! :bye:

ehi ehi ehi, what is your name?

Link to comment
Share on other sites

I can't understand what ConsoleRead does, but you can write using ConsoleWrite.

About interpreting commands, I found this great function from ResNullius (here - ):

;credits to Valik & Mat
#AutoIt3Wrapper_Change2CUI=y
#include <WinAPI.au3>

$sResponse = _ConsoleInput("Please input some text: ")
ConsoleWrite("You Entered: " & $sResponse & @CRLF)

Func _ConsoleInput($sPrompt)
    If Not @Compiled Then Return SetError(1, 0, 0) ; Not compiled

    ConsoleWrite($sPrompt)

    Local $tBuffer = DllStructCreate("char"), $nRead, $sRet = ""
    Local $hFile = _WinAPI_CreateFile("CON", 2, 2)

    While 1
        _WinAPI_ReadFile($hFile, DllStructGetPtr($tBuffer), 1, $nRead)
        If DllStructGetData($tBuffer, 1) = @CR Then ExitLoop
        If $nRead > 0 Then $sRet &= DllStructGetData($tBuffer, 1)
    WEnd

    _WinAPI_CloseHandle($hFile)
    Return $sRet
EndFunc

ehi ehi ehi, what is your name?

Link to comment
Share on other sites

Check functions TCPRecv and TCPSend. The examples show you how to code a client/server application.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I succeeded to create a client-server program.

now I need to make it more powerful adding to the server a function

that permits the administrator to read what it's happening on the server, and send commands to it at the same time (for console and GUIs)

 

I would know if it is possible being autoit single-thread.

do you know if this can be implemented?

thank you again, ^_^

ehi ehi ehi, what is your name?

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

BinaryDigit,

I'm interested with your project. Do you mind sharing your code with us?

Thank you :)

I don't have any project atm... I like to create a new one if this is possible.

when you manage a server running under a console, you can read what server says and at the same time writing for new commands. how can make D.O.S. inputoutput with autoit? :(

you can notice this especially in-game consoles.

ehi ehi ehi, what is your name?

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