Jump to content

maniootek

Active Members
  • Posts

    448
  • Joined

  • Last visited

Everything posted by maniootek

  1. Hi everyone, I'm working on a project where I want to create a tool that can improve or rephrase written text using the ChatGPT API. The idea is to select any text anywhere in Windows (for example: in a browser, application, system dialog, etc.) and send it to ChatGPT for suggestions. However, there's one specific requirement: I’d like to extract the selected text without relying on the clipboard (no copy-paste). Is it possible to achieve this using AutoIt, perhaps with UI Automation or WinAPI? The tool should be able to detect and read the currently selected text in any context – ideally universally, not just in specific applications. I know this might be a stretch, but I’m curious if anyone has experience with similar tasks or knows whether this is even technically feasible with AutoIt. Any insight, ideas, or code examples would be greatly appreciated! Thanks in advance!
  2. ... but I have another problem which is CTRL + Z (undo) does not undo last operation but many last operations
  3. I copied properties options from first post to my SciTEUser.properties and now problem is fixed. No warnings in the console and no problem with page scrolled when I hit Enter key. Thank you
  4. Before I disabled the option you mentioned I noticed this message in my console: Now after I commented line my console show only so there is no more warning like this: also there is no scroll issue when I hit Enter key Unfortunatelly, after enabling logging, there is no such a file
  5. The problem reported by @Nhardel about WTSLogonTime & WTSIdleTime but reading your post again I managed how to read it (from WTSSessionInfo [24]) I checked your RDPShadow app but I can't find clear information what this app do? By the way, do you have au3 code for this app?
  6. @argumentum did you solve the problem with LogonTime? I found your post: how to get all session info with data like LogonTime now?
  7. how to get LogonTime?
  8. I've recently installed the SciTE4AutoIt3 Beta v5.4.0 from this post. However, I’ve encountered an issue while coding: whenever I press the Enter key, the line I’m currently typing on jumps to the very top of the editor. This behavior is quite disruptive, and I’d like to disable this feature. I’ve checked the settings and documentation but haven’t found a solution yet. Could someone guide me on how to turn off this behavior? Is there a specific configuration or setting I need to adjust?
  9. my bad, there should be already changed
  10. When I tried to use the function _SFTP_FilePut() with the $sRemoteFile parameter pointing to a remote path that does not exist, the function returned 1. However, the file was not actually copied. The variable $sLine showed the following output: so I modified the function to handle this problem: ; #FUNCTION# ==================================================================================================================== ; Name...........: _SFTP_FilePut ; Description ...: Puts a file on a SFTP server. ; Syntax.........: _SFTP_FilePut ( $hConnection, $sLocalFile [, $sRemoteFile = ""] ) ; Parameters ....: $hConnection - as returned by _SFTP_Connect(). ; $sLocalFile - The local file i.e. "c:\temp". ; $sRemoteFile - Optional, The remote file (or use the source name if not defined) i.e. "/website/home". ; $fRecursivePut - Optional, Recurse through sub-dirs: 0 = Non recursive, 1 = Recursive (default) ; Return values .: Success - 1 ; Failure - 0, sets @error ; |1 - The connection is closed ; |2 - Local file does not exists ; |3 - No such file or directory on remotre host ; |4 - Other error ; Author ........: Lupo73 ; Modified.......: maniootek ; Remarks .......: ; Related .......: _SFTP_Connect ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _SFTP_FilePut($hConnection, $sLocalFile, $sRemoteFile = "") If ProcessExists($hConnection) = 0 Then Return SetError(1, 0, 0) EndIf Local $sLine If $sRemoteFile <> "" Then $sRemoteFile = ' "' & $sRemoteFile & '"' EndIf Local $sCommand = 'put -- "' & $sLocalFile & '"' & $sRemoteFile & @CRLF StdinWrite($hConnection, $sCommand) While 1 $sLine = StdoutRead($hConnection) If ProcessExists($hConnection) = 0 Then Return SetError(1, 0, 0) ElseIf StringInStr($sLine, "unable to open") Then Return SetError(2, 0, 0) ElseIf StringInStr($sLine, "no such file or directory") Then Return SetError(3, 0, 0) ElseIf StringInStr($sLine, "psftp>") Then ExitLoop ElseIf StringInStr($sLine, "=> remote:") Then ContinueLoop ElseIf $sLine <> "" Then Return SetError(4, 0, 0) EndIf Sleep(10) WEnd Return 1 EndFunc ; ==>_SFTP_FilePut I have also modified the _SFTP_DirCreate() function to remove the trailing "/" from the $sRemoteFile parameter. This change was necessary because if you set the $sRemoteFile parameter to something like '/var/www/clients/client1/web4/web/storage/invoices/4/', the stdout will return this path without the final "/" character. This could lead to incorrect behavior, where an error is returned even though there is no actual error. ; #FUNCTION# ==================================================================================================================== ; Name...........: _SFTP_DirCreate ; Description ...: Makes a Directory on a SFTP server. ; Syntax.........: _SFTP_DirCreate ( $hConnection, $sRemoteDir ) ; Parameters ....: $hConnection - as returned by _SFTP_Connect(). ; $sRemoteDir - The remote Directory to create. ; Return values .: Success - 1 ; Failure - 0, sets @error ; |1 - The connection is closed ; |2 - Creation probably failed because the Directory already exists ; |3 - Other error ; Author ........: Lupo73 ; Modified.......: maniootek ; Remarks .......: ; Related .......: _SFTP_Connect ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _SFTP_DirCreate($hConnection, $sRemoteDir) If ProcessExists($hConnection) = 0 Then Return SetError(1, 0, 0) EndIf if StringRight($sRemoteDir, 1) = "/" then $sRemoteDir = StringTrimRight($sRemoteDir, 1) Local $sLine StdinWrite($hConnection, 'mkdir "' & $sRemoteDir & '"' & @CRLF) While 1 $sLine = StdoutRead($hConnection) If ProcessExists($hConnection) = 0 Then Return SetError(1, 0, 0) ElseIf StringInStr($sLine, $sRemoteDir & ": OK") Then ExitLoop ElseIf StringInStr($sLine, $sRemoteDir & ": failure") Then Return SetError(2, 0, 0) ElseIf $sLine <> "" Then Return SetError(3, 0, 0) EndIf Sleep(10) WEnd Return 1 EndFunc ; ==>_SFTP_DirCreate let me know if you can update your UDF
  11. I'm sorry I didn't specify my problem precisely. I meant Polish characters in the console. They are displayed correctly when using AutoIt3Wrapper.au3 "19.1127.1402.5" version and when I change to "23.402.1150.10" then It's displayed wrong. my SciTEUsers.properties contains this code: polish charasters in console.zip
  12. problem is back with version 23.402.1150.10
  13. There is no such a line in my au3.properties file. I have added this line but still got that message in the console. And yes, there are many changes in this version. Some are cool but some features stopped to work like shortcut CTRL + J. It says -> cursor not on a Variable or UDF. before it was working properly There is also frustrating page jump (scroll to certain position) when I hit Enter (new line)
  14. I have installed beta from here: https://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/SciTE5-with-DynamicFunctions/SciTE4AutoIt3.exe but after that, when I open au3 file I got this message on console: ... Files (x86)\AutoIt3\SciTE\Lua\AutoItDynamicIncludes.lua:682: attempt to concatenate a nil value (field 'MaxIncludes2Read')
  15. I just noticed, that AutoIt3Wrapper checks existance of include files even if the include code are commented. This happens only when include statement is commented in include file. Maybe I did not explained it well so I will show the example: Content of test.au3 file: #include "test2.au3" func helloworld() msgbox(0,0,$g_test) EndFunc Content of test2.au3 file: #cs #Include "test123.au3" #ce global $g_test = "hello world"
  16. Jumping to variable declaration is also possible with lua?
  17. YES! This works perfect now! So detailed example, again thank you so much! FirstVisibleLine is the code I needed.
  18. Yes. Now I have speficication and example I can work on. Anyway, I don't understand the specification fully (even if I translate it to my language). Lua syntax is also something new for me. Now I tried to fix one more issue with that code. Now my script version is increasing every save and cursor stays in the line I was working on but my code jump as the page is scrolled. I tried to fix it by finding some function which can read the current scroll position and then set that position. local curscrollpos = editor.XOffset editor:LineScroll(curscrollpos, 0) but it does not work
  19. I have one issue with this feature. Now when I run script from SciTE then my cursor jump to the beginning of the code to change the Version number. Is it possible that cursor stay in the place or jump back?
  20. thank you @Jos for taking the time to help me, I just love you 😍 It works ! by the way, this is the path to that file in my computer (%localuserdata% seems to be not valid environment variable)
  21. thank you but I do not compile scripts. I "run" them, any idea?
  22. Is it possible that SciTE editor will add version number like: ;Version: 1.001 MyFunc() Func MyFunc() MsgBox(0,0,"Hello World!") EndFunc and increase that number every time I edit/save the script? Sometimes I need to compare my backup script file with current version and I want to know how many times it was changed.
  23. This is just game changer in my coding now. Thank you @mLipok I just discovered that I can also jump to include file using ALT + I shortcut. That means that I set cursor on the code: #include "..\ADO.au3" and I hit ALT + I and then ADO.au3 file is opened in new tab in Scite Editor even that I did not specified full path to the include file. That's awesome 😄 I am now wondering if there is such a shortcut but for any file path used as a string in variable? Example below: Local $DirToMyFile = "..\..\shared\query\myquery002.sql" I wish to set cursor on that path, hit some shortcut and that file is opened by windows explorer in default editor is it possible?
×
×
  • Create New...