-
Posts
138 -
Joined
-
Last visited
-
Days Won
2
Everything posted by tarretarretarre
-
Hi Guys, I appriciate the love and I want to answer all the questions, however im working full time so I havent had the chance to make any updates to the IO project, when its vacation time i will probably be a little bit more active.
-
Hi, Yes I have stumbled upon that as well. V4 is still beta and I will eventually get it patched, meanwhile, try to wrap all your _Io_On events in an function, and run that function after your reconnect attempt, that should solve your "NOT_FOUND" errors Something like this func RegisterEvents() _Io_On('SomethingHappend') EndFunc _Io_Connect() RegisterEvents() func ReconnectAttempt() _Io_Connect() RegisterEvents() EndFunc
-
2021-02-14 update: you can now serialize and unSerialize data in JavaScript as well. Checkout the official npm package or the github repo. This makes it possible to pass data between AutoIt and JavaScript applications. Eventually I will make an package for PHP aswell.
-
Yes, or at least kindof. My next project is going to be straight up WebSockets in AutoIt. That means you could establish connections between any language that support WebSockets, Socket Io has support for websockets, so it would be possible to make a straight port of the real Socket IO But, I am working 150% with so many projects, so I dont know when I will have the time
-
Hi, As I replied in your DM. AutoIT SocketIo is built for autoit 2 autoit communication exclusivly. You would need to rebuild my whole UDF and its deserialization dependencies to achieve the same outcome. However "AutoiT-API-WS" is more suitable for your needs. You could transfer data between your autoit app and Python app with a few lines of code And if you want to use the "Observer design pattern", you could API-WS in conjunction with AutoIt-Events :
-
Of course, I forgot about that. Thanks! Inside Scite config (hotkey CTRL + 1) in the general 1 tab, you can set the User include folder.
- 5 replies
-
- dd
- vargettype
-
(and 3 more)
Tagged with:
-
For convenience sake you can put DD.au3 in your AutoIt install directory C:\Program Files (x86)\AutoIt3\Include That will cause "#include <DD.au3>" to be available in every .au3-file Update, do this instead!
- 5 replies
-
- dd
- vargettype
-
(and 3 more)
Tagged with:
-
About AutoIt-DD AutoIt-DD is an carbon copy of Laravels dd helper. DD stands for "Dump and DIE" and is a great tool for debugging AutoIt variables Features Get useful information about any AutoIt variable Nested Arrays and Scripting dictionaries Multi DIM arrays Great structure and colored output Example In Example.au3 you can run a fully featured example, but I also provided a print screen for you lazy people Dowonload
- 5 replies
-
- dd
- vargettype
-
(and 3 more)
Tagged with:
-
Version 1.0.0
702 downloads
About AutoIt-DD AutoIt-DD is an carbon copy of Laravels dd helper. DD stands for "Dump and DIE" and is a great tool for debugging AutoIt variables Features Get useful information about any AutoIt variable Nested Arrays and Scripting dictionaries Multi DIM arrays Great structure and colored output Example In Example.au3 you can run a fully featured example, but I also provided a print screen for you lazy people -
I think i'm using a non intended feature of the "keep formatting when pasting" when copy and pasting from my git READMEs
- 3 replies
-
- observer
- observerpattern
-
(and 2 more)
Tagged with:
-
In the Autoit-Socket-IO documentation you can read more about how this can be implemented to extend your own UDF or APP for 3rd party integrations.
- 3 replies
-
- observer
- observerpattern
-
(and 2 more)
Tagged with:
-
Version 4.0.0-beta (This update break scripts.) Code base fully rewritten with Autoit-Events and decoupled to improve code quality and reduce bloat. The new UDF is very different from 3.x.x so please checkout the UPGRADE guide to fully understand all changes Added new documentation documentaion
-
Hi all, almost a year later Version 3.0.0 (This update break scripts. Please consult the upgrade.md for guidance) Now supports serialization Scripting Dictionaries Added UnitTester UDF to the mix This is the last version of the current code base. Version 3.0.0 is not gonna live long though, because I already have a 4.0 version coming up soon with major changes and improvements.
-
Version 4.0.0-beta
1,500 downloads
Version 2.x.x and 3.x.x has been moved to branch 3.x About Autoit-Socket-IO Autoit-Socket-IO is a event driven TCP/IP wrapper heavily inspired from Socket.IO with focus on user friendliness and long term sustainability. I constantly want to make this UDF faster and better, so if you have any suggestions or questions (beginner and advanced) Do not hesitate to ask them, I will gladly help! Key features Simple API 99% data-type serialization thanks to Autoit-Serialize Can easily be extended with your own functionality thanks to Autoit-Events "Educational" examples Data encryption thanks to _<Crypt.au3> Limitations Speed. This UDF will sacrifice some speed for convenience Read more in the official thread-
- socket-io
- autoit-sockets
-
(and 2 more)
Tagged with:
-
About AutoIt-Events AutoIt-Events is an event Observer and is a core dependency for Autoit-Socket-IO but can be used for any Autoit project. Example #include "Event.au3" ; Subscribe listeners _Event_Listen(UserCreatedEvent, SendWelcomeMail) _Event_Listen(UserCreatedEvent, RegisterNewsLetter) ; Fire event _Event(UserCreatedEvent, @UserName, "tarre.islam@gmail.com") Func UserCreatedEvent(Const ByRef $oEvent, $name, $email) ; via $oEvent you can pass data to its listeners $oEvent.add("name", $name) $oEvent.add("email", $email) $oEvent.add("id", 1) EndFunc Func SendWelcomeMail(Const $oEvent) MsgBox(64, "Welcome mail sent", "Welcome mail sent to " & $oEvent.item("name") & " with email " & $oEvent.item("email")) EndFunc Func RegisterNewsLetter(Const $oEvent) MsgBox(64, "News letter registred", "News letter bound to user id " & $oEvent.item("id")) EndFunc The code is also available at Github Autoit-Events-1.0.0.zip
- 3 replies
-
- observer
- observerpattern
-
(and 2 more)
Tagged with:
-
About Serialize Serialize a given value to get it's string representation, that you can later unSerialize back to its original value. Including nested arrays and objects. This is useful for storing and transferring data between applications. 2021-02-14 update: you can now serialize and unSerialize data in JavaScript as well. Checkout the official npm package or the github repo. This makes it possible to pass data between AutoIt and JavaScript applications. Eventually I will make an package for PHP aswell. Limitations Mutli dim arrays are not supported Examples Basic example #include "Serialize.au3" #include <Array.au3> ; Define some data Global $array = [1,2,3] ; Serialize Global $serialized = _Serialize($array) MsgBox(64, "Serialized data", $serialized) ; Unserialize Global $unSerialized = _UnSerialize($serialized) _ArrayDisplay($unSerialized) Objects and nesting #include "Serialize.au3" #include <Array.au3> ; Define some data Global $preArray = [1, 2, 3] Global $array = [5, 6, $preArray] Global $obj = ObjCreate("Scripting.Dictionary") $obj.add("firstName", "Tarre") $obj.add("age", 29) $obj.add("array", $array) $obj.add("active", True) ; Serialize Global $serialized = _Serialize($obj) MsgBox(64, "Serialized data", $serialized) ; Unserialize Global $unSerialized = _UnSerialize($serialized) MsgBox(64, "Unserialized data", "firstName = " & $unSerialized.item("firstName") & @LF & "age = " & $unSerialized.item("age") & @LF & "active = " & $unSerialized.item("active")) Global $array = $unSerialized.item("array") Global $preArray = $array[2] _ArrayDisplay($array, "$array") _ArrayDisplay($preArray, "$preArray") The code is also available on Github Autoit-Serialize-1.0.0.zip
-
I have released 1.0.1-beta Bugfixes Empty array/object responses would not serialize properly Empty strings keys would not get serialized propertly Changes The router now lazily accepts appended slashes (example: http:/localhost:4545/route/) New Added some lousy tests, see "Testing.au3" for more info
-
About AutoIt-API-WS AutoIt-API-WS is a light weight web server with expressive syntax, with the sole purpose of wrapping your existing AutoIt app with little to no effort. With AutoIt-API-WS you can send and receive data between any application or framework, as long they can handle HTTP requests, which is an industry standard today. Like my other communcations UDF AutoIt-Socket-IO AutoIt-API-WS is heavily inspired from the big boys, but this time its Laravel and Ruby on Rails. Features Highlights No external or internal dependencies required RESTful mindset when designed Expressive syntax Small codebase Heavy use of Michelsofts Dictionary object Limitations Not complient with any RFC, so something important could be missing. Time will tell! One persons slow loris attack will kill the process forever. Example of implemetnation (With screenshots) This is a basic cRud operation with the RESTful mindset in use. #include "API.au3" #include <Array.au3> _API_MGR_SetName("My APP DB adapter") _API_MGR_SetVer("1.0 BETA") _API_MGR_SetDescription("This adapter allows you to get this n that") _API_MGR_Init(3000) _API_MGR_ROUTER_GET('/users', CB_GetUsers, 'string sortBy', 'Get all users, sortBy can be either asc or desc. asc is default') _API_MGR_ROUTER_GET('/users/{id}', CB_GetUsersById, 'int id*', 'Get user by id') While _API_MGR_ROUTER_HANDLE() WEnd Func DB_GetUsers() Local $userA = ObjCreate("Scripting.Dictionary") Local $userB = ObjCreate("Scripting.Dictionary") $userA.add('id', 1) $userA.add('name', 'TarreTarreTarre') $userA.add('age', 27) $userB.add('id', 2) $userB.add('name', @UserName) $userB.add('age', 22) Local $aRet = [$userA, $userB] Return $aRet EndFunc Func CB_GetUsers(Const $oRequest) Local $aUsers = DB_GetUsers() If $oRequest.exists('sortBy') Then Switch $oRequest.item('sortBy') Case Default Case 'asc' Case 'desc' _ArrayReverse($aUsers) EndSwitch EndIf Return $aUsers EndFunc Func CB_GetUsersById(Const $oRequest) Local Const $aUsers = DB_GetUsers() Local $foundUser = Null For $i = 0 To UBound($aUsers) -1 Local $curUser = $aUsers[$i] If $curUser.item('id') == $oRequest.item('#id') Then $foundUser = $curUser ExitLoop EndIf Next If Not IsObj($foundUser) Then Return _API_RES_NotFound(StringFormat("Could not find user with ID %d", $oRequest.item('#id'))) EndIf return $foundUser EndFunc When you visit http://localhost:3000 you are greeted with this pleasent view that will show you all your registred routes and some extra info you have provided. When you visit http://localhost:3000/users the UDF will return the array of objects as Json And here is an example of http://localhost:3000/users/1 More examples can be found here (NEWEST 2020-09-21) Autoit-API-WS-1.0.3-beta.zip OLD VERSIONS Autoit-API-WS-1.0.0-beta.zip Autoit-API-WS-1.0.1-beta.zip
-
Check if printer is done printing
tarretarretarre replied to tarretarretarre's topic in AutoIt General Help and Support
Oh thanks! I will take a lookbat this 😊 Thanks -
Hi, So when using _FilePrint to print files. You can't (as far as I know) check if the print job is done. Not with cmd, not with AutoIt, not with powershell. This is the printer I use: https://support.brother.com/g/b/downloadtop.aspx?c=us_ot&lang=en&prod=lpql700eus Do you guys have any idea on how I could achive this. I do not want to sleep or have any human interaction Here is how I imagine I will use it Do _FilePrint(nextFile()) While _FileIsPrinting() Sleep(10) WEnd Until NoMoreFiles() Thank you!
-
Check RDP's valid user and password
tarretarretarre replied to RestrictedUser's topic in Windows Server
Take a look at MsTscAx here is an example in autoit -
I have updated the UDF to 2.0.0 Version 2.0.0 (This update break scripts. Please consult the upgrade.md for guidance) All global internal variables has been renamed. Added a bunch of new API methods: _Io_RegisterMiddleware, _Io_whoAmI, _Io_IsClient, _Io_IsServer, _Io_getAllByProperty and _Io_getFirstByProperty and some more. Read more about these in the documentation. _Io_socketGetProperty now has a setter method called _Io_socketSetProperty which can be used to set custom properties. _Io_socketGetProperty now has a third parameter "default" which is used when a property is not found Removed _Io_setEventPostScript and _Io_setEventPretScript in favor of _Io_RegisterMiddleware Improved documentation (It still needs some love though) Improved the verbosity of _Io_DevDebug
-
change FileCopy function a bit
tarretarretarre replied to Tosyk's topic in AutoIt General Help and Support
Here is a regex that will match your txt file lists according to your needs: https://regex101.com/r/ktKaBr/1 and here is another to match the other files: https://regex101.com/r/TKAQTD/2 Look at https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm the regex flags could be put in (?<here>) in the end of your string.