Jump to content
Sign in to follow this  
binarydigit0101

about interactive server

Recommended Posts

binarydigit0101

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?

Share this post


Link to post
Share on other sites
binarydigit0101

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?

Share this post


Link to post
Share on other sites
Chimp

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


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

Share this post


Link to post
Share on other sites
water

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 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
binarydigit0101

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?

Share this post


Link to post
Share on other sites
binarydigit0101

is it possible? :huh:


ehi ehi ehi, what is your name?

Share this post


Link to post
Share on other sites
binarydigit0101

ok, I presume it isn't possible.

thank you all :)


ehi ehi ehi, what is your name?

Share this post


Link to post
Share on other sites
FireFox

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

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
binarydigit0101

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?

Share this post


Link to post
Share on other sites
FireFox

Not at all. Just understand it's possible.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
michaelslamet

BinaryDigit,

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

Thank you :)

Share this post


Link to post
Share on other sites
binarydigit0101

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?

Share this post


Link to post
Share on other sites
FireFox

how can make D.O.S. inputoutput with autoit? :(

I know Mat made a Console UDF but I can't find (within a few secs) the git link.

Try this one: https://code.google.com/p/consoleau3/downloads/list


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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  

×