Jump to content

Recommended Posts

Posted

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?

Posted

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?

Posted

Hi binarydigit0101

if this can interest you
time ago I sketched a >simple client/server script to send DOS commands to a server, and receive back the result.

bye

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Posted

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 2024-07-28 - Version 1.6.3.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 (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

 

Posted

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?

  • 2 weeks later...
Posted

Yes it's possible, depending on your internet connection speed if you want to see the screen, otherwise there's no problem :)

Br, FireFox.

Posted (edited)

what do you mean? :)

do you mean I need a screen session to control using autoit?

or do I just note server messages while administrator can send commands?

Edited by binarydigit0101

ehi ehi ehi, what is your name?

  • 2 months later...
Posted

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?

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...