-
Posts
1,700 -
Joined
-
Last visited
-
Days Won
7
AZJIO last won the day on July 10
AZJIO had the most liked content!
About AZJIO
- Birthday 01/01/2014
Profile Information
-
Location
Russian
Recent Profile Visitors
AZJIO's Achievements
-
pixelsearch reacted to a post in a topic: How to lock the position of a GUI window
-
NassauSky reacted to a post in a topic: Make a splitter
-
ghost911 reacted to a post in a topic: PureAutoIt machine code compiler small executable
-
argumentum reacted to a post in a topic: PureAutoIt machine code compiler small executable
-
PureAutoIt machine code compiler small executable
AZJIO replied to ghost911's topic in AutoIt Example Scripts
WinGetClassList EnableExplicit Structure winparam hwnd.i title.s text.s result.s EndStructure Procedure EnumWinProc(hwnd.l, *ptr.winparam) Protected title${256} ; буфер GetWindowText_(hwnd, @title$, 256) If Asc(title$) And title$ = *ptr\title PokeL(@*ptr\hwnd, hwnd) ProcedureReturn 0 EndIf ProcedureReturn 1 EndProcedure Procedure EnumChildProc(hwnd.l, *ptr.winparam) Protected class${256}, text${256} GetClassName_(hwnd, @class$, 256) If Asc(class$) If Asc(*ptr\text) GetWindowText_(hwnd, @text$, 256) If text$ = *ptr\text *ptr\result + class$ + #LF$ EndIf Else *ptr\result + class$ + #LF$ EndIf EndIf ProcedureReturn 1 EndProcedure Procedure.s WinGetClassList(title$, text$ = "") Protected ptr.winparam ptr\title = title$ ptr\text = text$ EnumWindows_(@EnumWinProc(), @ptr) If ptr\hwnd EnumChildWindows_(ptr\hwnd, @EnumChildProc(), @ptr) ptr\result = RTrim(ptr\result, #LF$) ProcedureReturn ptr\result EndIf EndProcedure Debug WinGetClassList("Untitled — Notepad") -
Trong reacted to a post in a topic: PureAutoIt machine code compiler small executable
-
PureAutoIt machine code compiler small executable
AZJIO replied to ghost911's topic in AutoIt Example Scripts
for DLL -
ghost911 reacted to a post in a topic: PureAutoIt machine code compiler small executable
-
PureAutoIt machine code compiler small executable
AZJIO replied to ghost911's topic in AutoIt Example Scripts
@ghost911 Use version 6.0.4, this is the latest version that creates a compact executable file and is supported on WindowsXP. Version 6.11 the minimum size of the compiled executable file starts at 250 kb. -
Trong reacted to a post in a topic: PureAutoIt machine code compiler small executable
-
PureAutoIt machine code compiler small executable
AZJIO replied to ghost911's topic in AutoIt Example Scripts
imitation GUICtrlSetResizing() -
Trong reacted to a post in a topic: PureAutoIt machine code compiler small executable
-
Trong reacted to a post in a topic: PureAutoIt machine code compiler small executable
-
PureAutoIt machine code compiler small executable
AZJIO replied to ghost911's topic in AutoIt Example Scripts
_TempFile -> TmpFile FileCreateShortcut -> CreateLink -
If you are interested in the SpiderBasic programming language, then look at my other projects in my signature on that forum. Sources included. You can see screenshots here
-
Using SpiderBasic I built AutoIt3.apk. You can read more about the source here. screenshots: menu, settings, search
-
Updated (09/26/2023)
-
SpellNumber function to convert numbers to words
AZJIO replied to ioa747's topic in AutoIt Example Scripts
http://forum.oszone.net/post-1907424.html#post1907424 http://azjio.narod.ru/autoit3_docs/userfunctions/_NumberNumToName.htm https://www.autoitscript.com/forum/topic/142799-converting-numbers -
Accessing phone storage (advice needed)
AZJIO replied to gillesg's topic in AutoIt General Help and Support
DLL Local $ErrorOutput = DllStructCreate("wchar[128]") Local $Output = DllStructCreate("wchar[1024]") Local $DeviceName ; Local Dim $aResult[5] Local $hDLL = DllOpen("PB.Ex_MTP_x64.dll") ; Local $hDLL = DllOpen("PB.Ex_MTP_x86.dll") If @error Then MsgBox(0, "", "@error") EndIf DllCall($hDLL, "int", "ExamineMTP", "ptr", DllStructGetPtr($ErrorOutput)) If @error Then MsgBox(0, "ExamineMTP", "@error") EndIf ; While 1 $aResult = DllCall($hDLL, "int", "NextMTPEntry", "ptr", DllStructGetPtr($ErrorOutput)) If @error Then MsgBox(0, "NextMTPEntry", "@error") EndIf ; If $aResult[0] Then DllCall($hDLL, "int", "MTPEntryName", "ptr", DllStructGetPtr($Output), "ptr", DllStructGetPtr($ErrorOutput)) $DeviceName = DllStructGetData($Output, 1) MsgBox(0, "", $DeviceName) ; EndIf ; Wend DllCall($hDLL, "int", "OpenMTP", "int", "1", "WSTR", $DeviceName, "ptr", DllStructGetPtr($ErrorOutput)) If @error Then MsgBox(0, "OpenMTP", "@error") EndIf DllCall($hDLL, "int", "GetMTPManufacturer", "int", "1", "ptr", DllStructGetPtr($Output), "ptr", DllStructGetPtr($ErrorOutput)) If @error Then MsgBox(0, "GetMTPManufacturer", "@error") EndIf MsgBox(0, "GetMTPManufacturer", DllStructGetData($Output, 1)) DllCall($hDLL, "int", "CloseMTP", "int", "1", "ptr", DllStructGetPtr($ErrorOutput)) DllClose($hDLL) $ErrorOutput = 0 $Output = 0 There are examples in PureBasic, but I'm too lazy to redo it. -
I tried to make functions for capturing text from Scintilla #include <WinAPI.au3> Global Const $SCI_GETLENGTH = 2006 Global Const $SCI_GETCHARACTERPOINTER = 2520 Global Const $SCI_GETRANGEPOINTER = 2643 Global Const $SCI_GETCODEPAGE = 2137 Global Const $SCI_GETCURRENTPOS = 2008 Global Const $SCI_GETANCHOR = 2009 Global Const $SC_CP_UTF8 = 65001 Global Const $PROCESS_ALL_ACCESS = 2035711 ; Global Const $SMTO_ABORTIFHUNG = 2 ; В оригинале на PureBasic для получения SCI_GETRANGEPOINTER используется WinAPI функция SendMessageTimeout(), ; хотя непонятно зачем, если получение указателя не является затратной по времени функцией Func GetScintillaText() Local $ReturnValue Local $tagSTRING Local $tBuffer Local $length Local $iPID, $hProcess, $iOffset ; вынести получение дескриптора за пределы функции $ScintillaHandle = ControlGetHandle('[CLASS:SciTEWindow]', "", "[CLASSNN:Scintilla1]") ; [CLASS:Notepad++] If $ScintillaHandle Then $length = _SendMessage($ScintillaHandle, $SCI_GETLENGTH, 0, 0) If $length Then $length += 2 $tagSTRING = "char strdata[" & $length & "]" ; $tagSTRING = "wchar strdata[" & $length & "]" ; $tagSTRING = "struct;wchar strdata[" & $length & "];endstruct" $tBuffer = DllStructCreate($tagSTRING) If Not $tBuffer Then ; получаем позицию данных в процессе Scintilla, чтобы прочитать данные по указателю в памяти $iOffset = _SendMessage($ScintillaHandle, $SCI_GETCHARACTERPOINTER, 0, 0) $CodePage = _SendMessage($ScintillaHandle, $SCI_GETCODEPAGE, 0, 0) If $iOffset Then _WinAPI_GetWindowThreadProcessId ($ScintillaHandle, $iPID) $hProcess = _WinAPI_OpenProcess($PROCESS_ALL_ACCESS, 0, $iPID) If $hProcess Then _WinAPI_ReadProcessMemory($hProcess, $iOffset, DllStructGetPtr($tBuffer), $length, 0) _WinAPI_CloseHandle($hProcess) $ReturnValue = DllStructGetData($tBuffer, "strdata") If $CodePage = $SC_CP_UTF8 Then ; Чтобы не тратить память на бинарную строку преобразование с помощью _WinAPI_MultiByteToWideChar $ReturnValue = _WinAPI_MultiByteToWideChar($ReturnValue, 65001, 0, True) ; $ReturnValue = StringToBinary($ReturnValue) ; $ReturnValue = BinaryToString($ReturnValue, 4) EndIf EndIf EndIf EndIf EndIf EndIf Return $ReturnValue EndFunc ; Func GetScintillaRangeText($cursor, $length) Func GetScintillaRangeText() Local $ReturnValue Local $tagSTRING Local $tBuffer Local $iPID, $hProcess, $iOffset Local $cursor, $anchor ; вынести получение дескриптора за пределы функции $ScintillaHandle = ControlGetHandle('[CLASS:SciTEWindow]', "", "[CLASSNN:Scintilla1]") ; [CLASS:Notepad++] If $ScintillaHandle Then ; вынести за скобки, чтобы функция могла захватывать диапазон не обязательно выделенный ; в кодировке UTF-8 есть однобайтовые и двубайтовые символы, поэтому позиция в байтах заданная ручками не всегда объективна, ; так как может встать на середину двухбайтового символа и результат неверный. А захват выделенного не имеет этой проблемы. ; Мы задаём в символах, а функция работает в байтах. ; Чтобы задать в символах можно попробовать получить в широких символах, а после преобразования ($CodePage) обрезать по числу символов. $cursor = _SendMessage($ScintillaHandle, $SCI_GETCURRENTPOS, 0, 0) $anchor = _SendMessage($ScintillaHandle, $SCI_GETANCHOR, 0, 0) If $anchor = $cursor Then Return "" EndIf If $anchor < $cursor Then $length = $cursor - $anchor $cursor = $anchor Else $length = $anchor - $cursor EndIf If $length Then $tagSTRING = "char strdata[" & $length & "]" ; $tagSTRING = "wchar strdata[" & $length & "]" ; $tagSTRING = "struct;wchar strdata[" & $length & "];endstruct" $tBuffer = DllStructCreate($tagSTRING) If Not $tBuffer Then ; получаем позицию данных со сдвигом к курсору в процессе Scintilla, чтобы прочитать данные по указателю в памяти $iOffset = _SendMessage($ScintillaHandle, $SCI_GETRANGEPOINTER, $cursor, 0) $CodePage = _SendMessage($ScintillaHandle, $SCI_GETCODEPAGE, 0, 0) If $iOffset Then _WinAPI_GetWindowThreadProcessId ($ScintillaHandle, $iPID) $hProcess = _WinAPI_OpenProcess($PROCESS_ALL_ACCESS, 0, $iPID) If $hProcess Then _WinAPI_ReadProcessMemory($hProcess, $iOffset, DllStructGetPtr($tBuffer), $length, 0) _WinAPI_CloseHandle($hProcess) $ReturnValue = DllStructGetData($tBuffer, "strdata") If $CodePage = $SC_CP_UTF8 Then ; Чтобы не тратить память на бинарную строку преобразование с помощью _WinAPI_MultiByteToWideChar $ReturnValue = _WinAPI_MultiByteToWideChar($ReturnValue, 65001, 0, True) ; $ReturnValue = StringToBinary($ReturnValue) ; $ReturnValue = BinaryToString($ReturnValue, 4) EndIf EndIf EndIf EndIf EndIf EndIf Return $ReturnValue EndFunc MsgBox(0, 'Весь текст', "|" & GetScintillaText() & "|") ; MsgBox(0, 'Сообщение', "|" & GetScintillaRangeText(7, 4) & "|") ; MsgBox(0, 'Сообщение', "|" & GetScintillaRangeText(8, 4) & "|") MsgBox(0, 'Выделенное', "|" & GetScintillaRangeText() & "|")
-
Update Command line "TitlePart ClassWindow CurrentWord TestFlag" supported for 3rd party Scintilla editors. Now you can use the same executable for PureBasic, SciTE, Notepad++. In the description of the program, I added configuration files for SciTE and Notepad++ Added context menu with 5 items (Copy, Autohide, Next color, ini, Exit) Improved regular expressions, this increased the speed by almost 2 times. Calling the program again terminates the previous instance of the program. Bugfix: now precise positioning, expands collapsed code snippets.
-
AZJIO reacted to a post in a topic: BigNum UDF
-
Update Regular expressions are now in the ini file
-
FindAllReferencesSciTE screenshot Tool for SciTE to show all lines of code containing the selected keyword. Working with the program: 1. Select a function, variable, keyword or something else, or simply put the cursor on the word without selecting anything and press the hot key. 2. In the window that appears, there will be a table of all found lines with this word and the line number. Clicking on a line scrolls the SciTE code to the position of that line and you can edit at that point. Clicking in the header returns to its original position. 3. You can choose one of the ready-made regular expressions, for example "find all cycles", etc. and navigate through these elements. You can enter your regular expression and press Enter. 4. The window retains its dimensions, so drag to the right and increase in height. Download: yandex, upload.ee
-
PureAutoIt machine code compiler small executable
AZJIO replied to ghost911's topic in AutoIt Example Scripts
IniWrite uses CreatePreferences. This is wrong, as CreatePreferences creates an empty file and will destroy all preferences, leaving only one. MsgBox - you are using WinAPI, but you can use the original MessageRequester() function, then you get cross-platform code. StringIsDigit uses PCRE for you, but I gave you a function without using PCRE. Using PCRE adds 150 KB to the size of the executable. In this case, your file size will be almost the same as that of AutoIt3. FindPartialWindow() - why are you creating the t$=Space(999) variable inside the loop. This can be done 1 time outside the loop. Run() EnableExplicit Structure String2 key.s exec.s EndStructure ; modified function by reference to extract parameters and executable ; https://www.cyberforum.ru/pure-basic/thread3028721.html#post16492165 Procedure.s CmdLineRaw(*res.String2) Protected pos, Char.s pos = FindString(*res\exec, Chr(34), 1) If pos = 1 ; if you find a quote in the first character, then Char=quote, it means the path with spaces Char = Chr(34) Else Char = " " EndIf pos = FindString(*res\exec, Char, 2) ; looking for separator Char from the second character If pos > 0 pos + 1 If Mid(*res\exec, pos, 1) = " " pos + 1 EndIf ; found "pos" - the real position of the beginning of the com line *res\key = Right(*res\exec, Len(*res\exec) - pos + 1) ; options *res\exec = Left(*res\exec, pos - 1) ; executable EndIf EndProcedure Procedure Run(program.s, workdir.s = "", show_flag = 0, opt_flag = 0) Protected res.String2 res\exec = program res\key = "" CmdLineRaw(@res) show_flag & opt_flag ; I didn't check the flags ProcedureReturn RunProgram(res\exec, res\key, workdir, show_flag) EndProcedure ; Run(~"Explorer.exe /Select,\"C:\\Windows\\INF\"") Run("notepad.exe C:\Windows\system.ini") ; Run("cmd.exe /c (@Echo off & @Echo. & Color 1e & chkdsk.exe Z: /F /X& set /p Ok=^>^>)")