Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/13/2019 in all areas

  1. I know this is an older thread but this exact issue started happening to me today, I tested everything I could thats been mentioned in this thread and all the exact same results. I started to notice that some of my scripts were working. The only thing I noticed the working scripts had were that they were large (70-80k lines). So I did some testings with a simple script of just "Msgbox(0,0,0)" (which didn't work) and kept adding 500 lines of "Msgbox(0,0,0)" all the way to 4500 lines worth (which now works as expected). Now time to work backwards until I found the exact line that made it work which ended up being 4371 lines (this worked but 4370 didn't) Then I tested further, I deleted line 4371 (which again stopped it working) and then changed the last line (4370) to "Msgbox(0,0,00)" (just added 1 extra character) and again the program started working which made me realise it was the total lines it was the total characters in the entire script. I checked the size of the file and it was EXACTLY 64KB, I went back into the file and changed the last line again back to "Msgbox(0,0,0)" which made made the file 63.9KB and stopped the program working. I checked through and tested with all my scripts, every single one under 64KB didnt work and every single one 64kb and up worked perfectly. I'm not smart enough to understand why this stops the scripts working but its to much of coincedence that every script 64 and above works so it must have something to do with it. if anyone could shed some light on this situation with this new bit of info it would be great. Im running windows 10 pro on a VirtualBox 64bit on the latest Scite/Autoit/Windows updates and all extension pack and guest additions for VirtualBox. Hope this helps someone get to the bottom of the issue.
    2 points
  2. I have wrote a lot of binary code library for AutoIt before. I also discover many ways to generate binary code for AutoIt in the past. However, all of them have limitation or need some extra effort. Recently, I think I found the best and easiest way to generate the binary code. So I wrote this UDF, may be my last one about binary code. The Features:Both AutoIt x86 and x64 version are supported.Windows API and static variables can be use (code relocation supported).Decompression at run-time with smallest footprint LZMA decoder.Allocated memory blocks are released automatically.Most C source code works without modification.Two step or one step script generation, very easy to use.How It Works: The C source code must be compiled by MinGW GCC with "-S -masm=intel" option. Output is GAS syntax assembly file.BinaryCall Tool is able to convert the GAS syntax assembly file (*.s) to FASM syntax (*.asm). During the conversion, global symbols will be stored as "Symbol Jump Table" at the head of the file. The output file should be able to be assembled to binary file under command line by FASM.EXE. This syntax conversion is step 1.The step 2 is to assemble the file. BinaryCall Tool will use the embedded FASM to assemble every file twice to generate the relocation table. "BinaryCall.inc" will be included automatically before assembling to detect the Windows API and generate the "API Jump table". All the results will be compressed and converted to AutoIt script output.There are two major functions in the output script. _BinaryCall_Create() function allocates memorys, decompress the binary, relocates the address in memory, and fills the "API Jump Table"._BinaryCall_SymbolList() converts the "Symbol Jump Table" to memory addresses, and then store them as pointers in a DllStruct variable.Finally, we can use DllCallAddress() to call the memory address stored in the DllStruct.Step by Step Tutorial: Write C source code:#include <windows.h> void main() { MessageBox(0, "Hello", "Welcome Message", 1); }Use GCC MinGW 32/64 to compile the source code: gcc -S -masm=intel -m32 MessageBox.cUse BinaryCall Tool "GAS2AU3 Converter", select "MessageBox.s": If Not @AutoItX64 Then Local $Code = '...' Local $Reloc = '...' Local $Symbol[] = ["main"] Local $CodeBase = _BinaryCall_Create($Code, $Reloc) If @Error Then Exit Local $SymbolList = _BinaryCall_SymbolList($CodeBase, $Symbol) If @Error Then Exit EndIfPaste the output script, call the main() in AutoIt: #Include "BinaryCall.au3" ; Paste output here DllCallAddress("none:cdecl", DllStructGetData($SymbolList, "main"))Try to run it! Change Log:v1.0Initial release.v1.1A lot of improvement for GAS2ASM converter and FASM header file.Add many C Run-Time library as inline asm subroutines.Add command-line to argc/argv parser for easy calling main() function.Add ability to redirect stdio.More C source code can work without modification in this version. Following open source projects are tested. And Yes, they can run as binary code library in AutoIt now. SQLite 3.8.5 TCC 0.9.26 PuTTY beta 0.63 v1.2Dynamic-link library (DLL) calling is supported now. If the C program requires a DLL file to run, just put it together with the source file. BinaryCall Tool will searches *.dll and exports all the symbols in these DLL files automatically. Of course, you need these DLL files when run the output script. However, it also works if you loaded them by last version of MemoryDll UDF.To add more Windows API library easily by editing the ini file.Better error handling and more error messages in output script.Add zero padding to avoid short jumps that crash the relocation table.BinaryCall Tool accepts drag and drop files now.Some small bug fixed. BinaryCall 1.0.zip BinaryCall 1.1.zip BinaryCall 1.2.zip
    1 point
  3. argumentum

    MailSlot

    \\*\mailslot\Test should do it , or \\<IP>\mailslot\Test should, or \\<PCname>\mailslot\Test , can't remember, but play with that.
    1 point
  4. im assuming that when you run... Get-NetConnectionProfile | Where-Object { $_.NetworkCategory -match "$Public" } | Set-NetConnectionProfile -NetworkCategory Private directly into PS it performs correctly, so you probably dont need help with your powershell code. put some message boxes in between each line with new variables. so if you msgbox $sCommands does it show $PS mixing in with the proper syntax? since you are doing stdout then msgbox $iPID to see what is getting returned.
    1 point
  5. Musashi

    Lua for Scite

    Here a script that may help you (and others) to find the shortcuts stored in different locations (you will also find Ctrl+Shift+U -> see 4.). Global $sPrefix = StringTrimRight(@AutoItExe, 11) Global $sAu3Prop, $sGlobalProp, $sUserProp, $sFile, $aMatch, $sResult ; 1. Read shortcuts from au3.properties : $sAu3Prop = $sPrefix & 'SciTE\properties\au3.properties' $sResult = '' ConsoleWrite ('-------- Shortcuts from au3.properties ---------- ' & @CRLF) $sFile = FileRead($sAu3Prop) For $i = 0 To 49 $aMatch = StringRegExp($sFile, 'command\.shortcut\.' & $i & '\.\$\(au3\)=(.+)', 1) If IsArray($aMatch) Then $sResult &= $aMatch[0] & '|' $aMatch = StringRegExp($sFile, 'command\.name\.' & $i & '\.\$\(au3\)=(.+)', 1) $sResult &= $aMatch[0] & @CRLF EndIf Next ConsoleWrite($sResult & @CRLF) ; 2. Read shortcuts from SciTEGlobal.properties : $sGlobalProp = $sPrefix & 'SciTE\SciTEGlobal.properties' $sResult = '' ConsoleWrite ('-------- Shortcuts from SciTEGlobal.properties ---------- ' & @CRLF) $sFile = FileRead($sGlobalProp) $aMatch = StringRegExp($sFile, '(?m)user\.shortcuts=([^# ]+)', 1) If IsArray($aMatch) Then $sResult = StringRegExpReplace(StringRegExpReplace($aMatch[0], '\|?\\', ''), '\|$', '') EndIf ConsoleWrite($sResult & @CRLF) ; 3. Read shortcuts from SciTEUser.properties : ; Info : ; A modified version of the SciTEUser.properties may be located in another folder, ; i.e. @LocalAppDataDir\SciTE\SciTEUser.properties ;~ $sUserProp = $sPrefix & 'SciTE\SciTEUser.properties' $sUserProp = @LocalAppDataDir & '\AutoIt v3\SciTE\SciTEUser.properties' ; $sResult = '' ConsoleWrite ('-------- Shortcuts from SciTEUser.properties ---------- ' & @CRLF) $sFile = FileRead($sUserProp) If @error Then ConsoleWrite ('! File not found : ' & $sUserProp & @CRLF) Else $aMatch = StringRegExp($sFile, '(?m)user\.shortcuts=([^# ]+)', 1) If IsArray($aMatch) Then $sResult = StringRegExpReplace(StringRegExpReplace($aMatch[0], '\|?\\', ''), '\|$', '') ConsoleWrite($sResult & @CRLF) Else ConsoleWrite ('! No shortcuts found. Use another folder' & @CRLF & @CRLF) $sResult = '' EndIf EndIf ; 4. From the SciTERes.rc (just a list) : (Menu | Action | Shortcut) ConsoleWrite ('-------- Shortcuts from SciTERes.rc ---------- ' & @CRLF) ConsoleWrite ('File | New | Ctrl+N' & @CRLF) ConsoleWrite ('File | Open... | Ctrl+O' & @CRLF) ConsoleWrite ('File | Open Selected Filename | Ctrl+Shift+O' & @CRLF) ConsoleWrite ('File | Revert | Ctrl+R' & @CRLF) ConsoleWrite ('File | Close | Ctrl+W' & @CRLF) ConsoleWrite ('File | Save | Ctrl+S' & @CRLF) ConsoleWrite ('File | Save As... | Ctrl+Shift+S' & @CRLF) ConsoleWrite ('File | Save a Copy... | Ctrl+Shift+P' & @CRLF) ConsoleWrite ('Export | Print... | Ctrl+P' & @CRLF) ConsoleWrite ('Edit | Undo | Ctrl+Z' & @CRLF) ConsoleWrite ('Edit | Redo | Ctrl+Y' & @CRLF) ConsoleWrite ('Edit | Cut | Ctrl+X' & @CRLF) ConsoleWrite ('Edit | Copy | Ctrl+C' & @CRLF) ConsoleWrite ('Edit | Paste | Ctrl+V' & @CRLF) ConsoleWrite ('Edit | Duplicate | Ctrl+D' & @CRLF) ConsoleWrite ('Edit | Select All | Ctrl+A' & @CRLF) ConsoleWrite ('Edit | Match Brace | Ctrl+E' & @CRLF) ConsoleWrite ('Edit | Select to Brace | Ctrl+Shift+E' & @CRLF) ConsoleWrite ('Edit | Show Calltip | Ctrl+Shift+Space' & @CRLF) ConsoleWrite ('Edit | Complete Symbol | Ctrl+I' & @CRLF) ConsoleWrite ('Edit | Complete Word | Ctrl+Enter' & @CRLF) ConsoleWrite ('Edit | Expand Abbreviation | Ctrl+B' & @CRLF) ConsoleWrite ('Edit | Insert Abbreviation | Ctrl+Shift+R' & @CRLF) ConsoleWrite ('Edit | Block Comment or Uncomment | Ctrl+Q' & @CRLF) ConsoleWrite ('Edit | Box Comment | Ctrl+Shift+B' & @CRLF) ConsoleWrite ('Edit | Stream Comment | Ctrl+Shift+Q' & @CRLF) ConsoleWrite ('Edit | Make Selection Uppercase | Ctrl+Shift+U' & @CRLF) ConsoleWrite ('Edit | Make Selection Lowercase | Ctrl+U' & @CRLF) ConsoleWrite ('Search | Find... | Ctrl+F' & @CRLF) ConsoleWrite ('Search | Find Previous | Shift+F3' & @CRLF) ConsoleWrite ('Search | Find in Files... | Ctrl+Shift+F' & @CRLF) ConsoleWrite ('Search | Replace... | Ctrl+H' & @CRLF) ConsoleWrite ('Search | Incremental Search... | Ctrl+Alt+I' & @CRLF) ConsoleWrite ('Search | Selection Add Next | Ctrl+Shift+D' & @CRLF) ConsoleWrite ('Search | Go to... | Ctrl+G' & @CRLF) ConsoleWrite ('Search | Previous Bookmark | Shift+F2' & @CRLF) ConsoleWrite ('Search | Toggle Bookmark | Ctrl+F2' & @CRLF) ConsoleWrite ('View | Whitespace | Ctrl+Shift+8' & @CRLF) ConsoleWrite ('View | End of Line | Ctrl+Shift+9' & @CRLF) ConsoleWrite ('View | Parameters | Shift+F8' & @CRLF) ConsoleWrite ('Tools | Compile | Ctrl+F7' & @CRLF) ConsoleWrite ('Tools | Clean | Shift+F7' & @CRLF) ConsoleWrite ('Tools | Stop Executing | Ctrl+Break' & @CRLF) ConsoleWrite ('Tools | Previous Message | Shift+F4' & @CRLF) ConsoleWrite ('Tools | Clear Output | Shift+F5' & @CRLF) ConsoleWrite ('Tools | Switch Pane | Ctrl+F6' & @CRLF) ConsoleWrite ('Line End Characters | Change Indentation Settings... | Ctrl+Shift+I' & @CRLF) ConsoleWrite ('Line End Characters | Use Monospaced Font | Ctrl+F11' & @CRLF) ConsoleWrite ('Buffers | Previous | Shift+F6' & @CRLF) BTW : Credits should go to @BugFix I have only summarized the information from the german site into one script and added small enhancements .
    1 point
×
×
  • Create New...