Jump to content

Search the Community

Showing results for tags 'fileio'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. I have a spreadsheet - daily routine which has two columns: activity and time as shown here | Activity | Time | |----------------------|----------| | Sleep | 6:00 am | | Toilet | 6:15 am | | Get ready for gym | 6:30 am | | Exercise | 7:50 am | | ... more things | 9:00 pm | | ... still more | 10:45 pm | | Sleep | 6:00 am | I wanted to find out, say in C1 which activity is current for me using now() I.e., if it’s 6:45am on my watch, it should show me Exercise in C1 Thanks to Adam D. PE, this formula works like magic to get the result =VLOOKUP(MOD(NOW(),1),{B2:B,A2:A},2,1) Now, I want to reproduce same result in autoit, how to do that? To have easy solution say, I copy-paste spreadsheet data in array directly in code, right? Use for loop and run the above vlookup function and show the answer using tooltip. How to achieve this? please help.
  2. IPC_IO.AU3 I am in the need for a simple synchronous Client/Server communication. I found several examples and references to various kinds of Inter-Process Communications such as TCP, Named Pipes, Mail Slots, Shared Memory, Memory Mapped Files, and simple Files. I wanted to see what the best solutions would be. I began developing a library and slowly began adding each of the IPC methods and ended up with a library with a very simple synchronous “ASCII” API where the application can choose which method to use at startup. For the Server side, a Server app must initialize communication by calling: Func InitConnection($cType = $cDefaultType, $ResourceName = "", $bBlock = $cDefaultBlocking, $fSleepFunc = "", $iBufSize = $DEFAULT_BUFSIZE) The optional arguments allow the app to specify the connection type (such as: $cNamedPipe, $cFile, $cTCP, $cSharedMem, $cMailSlot), a value for the resource name (such as the file, named pipe name, TCP port number, etc.), the communication buffer size, and a callback function for when the “read” is waiting for data. A “File Descriptor” is returned and must be used in the future API calls. The Server side must then call: Func StartConnection($iFD) This call waits for a Client to connect. The Server then calls: Func ReadData($iFD, ByRef $sData) To read a Request from the Client and then calls: Func WriteData($iFD, ByRef $sData) To send the reply back to the Client. When communication with the Client is done, the Server app will call: Func StopConnection($iFD) When the Server app is done with the communications it will call: Func EndConnection($iFD) For the Client side, a Client app must open the communication by calling: Func OpenConnection($cType = $cDefaultType, $ResourceName = "", $bBlock = $cDefaultBlocking, $fSleepFunc = "", $iBufSize = $DEFAULT_BUFSIZE) The optional arguments allow the app to specify the connection type (such as: $cNamedPipe, $cFile, $cTCP, $cSharedMem, $cMailSlot), a value for the resource name (such as the file, named pipe name, TCP port number, etc.), the communication buffer size, and a callback function for when the “read” is waiting for data. A “File Descriptor” is returned and must be used in the future API calls. The Client side then send a request to the Server app by calling: Func WriteData($iFD, ByRef $sData) To read a Response from the Server by calling: Func ReadData($iFD, ByRef $sData) To end the connection to the Server by calling: Func CloseConnection($iFD) Within the IPC_IO.AU3 library, each IPC method is ether: · “stream” based where data is read/written by calling _WinAPI_ReadFile/TCPRecv or _WinAPI_WriteFile/ TCPSend · “direct” based for Shared memory where the Client reads the data directly from the Server App’s memory and the Server directly reads the Client App’s memory In processing a request, the “ReadData” process starts by checking if data is ready to be read by calling the routine: “ReadStart”, then it reads in the size of the request by calling “ReadSize”, it then reads in the Ascii Request by calling “ReadBuffer”, then the sequence is completed by calling “ReadEnd”. The Write Process follows the same sequence with “WriteData” calling “WriteStart”, “WriteSize”, “WriteBuffer”, “WriteEnd”. Results My testing showed that the performance of sending and receiving of a 10k file took: · "Shared Memory" was the fastest, at 0.007468 Sec · “Named Pipes” at 0.015954 · “Mail Slots” at 0.016427 · “File Based” at 0.270287 · “TCP” at 0.994884 IPC_IO.au3 Client.au3 Server.au3
×
×
  • Create New...