Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/10/2025 in all areas

  1. 10-15-2024 In Development The creative hiatus had ended and development in motion, see recent posts for updates. From 4-15-2024: I've severely pumped the brakes and come to a creative hiatus on the project and have returned to the drawing board on many aspects of RPGenerator, including, foremost, the graphics as well as the over all code used. The autoit concept demo that's currently available here is being discontinued due to many reasons that have led to this decision, based on various difficulties or my own dissatisfaction/frustrations with aspects of the project and where it stands. What's in the plans? Right now I'm developing a scriptable and modular IRC core software with Python, with this core software I plan to make the RPGenerator hub IRC bot (as mentioned previously, this part is still happening, but instead will be developed purely in python.) Autoit comes in with client programs for windows users which will be a user side chat client that features some completely redesigned graphics and is built to connect and interact with game hubs being hosted by the python bot. As far as the autoit side of this project is concerned, it has been scrapped and slated for a complete start over with autoit. Official production continuation of RPGenerator is planned to begin October 2024 I'm also migrating stuff and remodeling my 'brand' thru GitHub and Patreon, which will include software, other digital products/media, and maybe one day merch. Who knows. Do not worry, RPGenerator will be back and better than ever! Mode60 Official Website (m0de-60.github.io) Version 0.01 Concept (STILL AVAILABLE) DOWNLOAD: RPGenerator/windows-concept-game at main · m0de-60/RPGenerator (github.com)
    1 point
  2. Dears, i am trying to come up with my own c/++ dll to connect autoit with mongodb or similar (without ADO). The goal is to exchange "unmodified" strings between autoit and my dll, we want to migrate a very large autoit application from using the filesystem as a database to a real database (potentially hundreds of thousands files are written and listed/read...), not yet sure if it really pays off to go the dll approach is worth it. One very simple alternative would be to use some http rest api bridge to talk with the database but this adds a little overhead because of the http protocol. The result of my tests below is as you see in the .au3 comments, the "Add" function call works including parameters and return int but the "Echo" functions parameter wchar_t* is always 0. Any clues be greatly appreciated! Besides some old forum posts i did not really find any examples how to pass string or binary data unmodified between dlls and autoit... test.au3: #AutoIt3Wrapper_UseX64=Y Global Const $g_sFileDll      = 'C:\dev\FileBridge++\FileBridge++\x64\Debug\FileBridge.dll' $hdll = DllOpen($g_sFileDll) #this works, $test is 5 $test = DllCall($hdll, "int:cdecl", "Add", "int", 2, "int", 3) #this works, we get a console print in scite and the messagebox initiated by dll pops up $test = DllCall($hdll, "int:cdecl", "Function", "int", 2, "int", 3) #this does not work, we only get 0 pointer int the dll $utf16String = "Hello, World" $ptr = DllStructCreate("wchar_t [" & StringLen($utf16String) + 1 & "]") ; +1 for null terminator DllStructSetData($ptr, 1, $utf16String) DllCall($hdll, "int", "Echo", "ptr", DllStructGetPtr($ptr)) DllClose($hdll) C++ Part: FileBridge++.h: #include <wchar.h> #define DLL_EXPORT #if defined DLL_EXPORT #define DECLDIR __declspec(dllexport) #else #define DECLDIR __declspec(dllimport) #endif int CppAdd(int a, int b); extern "C" {     // Declare all functions here     DECLDIR void Function(void);     DECLDIR int Add(int a, int b);     DECLDIR void Echo( wchar_t* utf16String);  // Function takes a pointer to MyStructure } FileBridge++.cpp: #include "pch.h" #include <iostream> #include <Windows.h>  #include "FileBridge++.h" using namespace std; extern "C" {     DECLDIR int Add(int a, int b)     {         return CppAdd(a, b);     }     DECLDIR void Function(void)     {         std::cout << "DLL Called! Hello AutoIt!" << std::endl;         MessageBox(0, TEXT("This MsgBox is created by the dll"), TEXT("Simple Dll..."), 0);     }     DECLDIR void Echo(wchar_t* utf16String)     {         if (utf16String == nullptr) {             std::wcout << L"Received NULL pointer!" << std::endl;             return;         }         std::wcout << L"You wrote: [" << utf16String << L"]" << std::endl;              } } int CppAdd(int a, int b) {     return(a + b); }
    1 point
  3. TL;DR: Create_Process calls cmd.exe if passed a .bat or .cmd file, however the non-standard character escaping of cmd.exe allows arbitrary code execution. NVD - CVE-2024-24576 (nist.gov) https://flatt.tech/research/posts/batbadbut-you-cant-securely-execute-commands-on-windows
    1 point
  4. Sounds like a cool project Just wanted to give you some advice regarding the host, free hosts are very shady so be careful with those. Since your project is open-source you can use Tux Family for hosting, they provide their services at no cost for FOSS projects If you want a generic host I'd recommend Uberspace.de, they have a pay-what-you-want model, so you can pay as low as 1 EUR/month, that's what I use for my hosting since it doesn't really get a lot of traffic. The recommended amount is 5 EUR. They also do good work by defending free software in actual courts (see the YouTube-DL case in Germany)
    1 point
  5. ptrex

    PDFCreator - Print2PDF

    PDFCreator in AutoIT 0=PDF, 1=PNG, 2=JPG, 3=BMP, 4=PCX, 5=TIFF, 6=PS, 7= EPS, 8=ASCII Someone in the help forum was wondering how to use the PDFCreator in AutoIT. When reading this, I was surprised to find that PDFCreator had a COM object in it's latest version. I have been using PDFCreator since years, but never know this :"> Anyhow here is the example on how to create a PDF Test page. ;; Testpage2PDF script ; Part of $PDFCreator ; License: GPL ; Homepage: http://www.sf.net/projects/pdfcreator ; Version: 1.0.0.0 ; Date: September, 1. 2005 ; Author: Frank Heindörfer ; Comments: Save the test page as pdf-file using the com interface of $PDFCreator. ; Translated by ptrex AutoItSetOption("MustDeclareVars", 1) Const $maxTime = 10 ; in seconds Const $sleepTime = 250 ; in milliseconds Dim $fso, $WshShell, $PDFCreator, $DefaultPrinter, $ReadyState, $c, _ $Scriptname, $Scriptbasename $fso = ObjCreate("Scripting.FileSystemObject") $Scriptbasename = $fso.GetBaseName(@ScriptFullPath) $WshShell = ObjCreate("WScript.Shell") $PDFCreator = ObjCreate("PDFCreator.clsPDFCreator") $PDFCreator.cStart ("/NoProcessingAtStartup") $ReadyState = 0 With $PDFCreator .cOption("UseAutosave") = 1 .cOption("UseAutosaveDirectory") = 1 .cOption("AutosaveDirectory") = $fso.GetParentFolderName(@ScriptFullPath) .cOption("AutosaveFilename") = "Testpage - PDFCreator" .cOption("AutosaveFormat") = 0 ; 0=PDF, 1=PNG, 2=JPG, 3=BMP, 4=PCX, 5=TIFF, 6=PS, 7= EPS, 8=ASCII $DefaultPrinter = .cDefaultprinter .cDefaultprinter = "PDFCreator" .cClearcache() .cPrintPDFCreatorTestpage() .cPrinterStop = 0 EndWith $c = 0 Do $c = $c + 1 Sleep ($sleepTime) Until ($ReadyState = 0) and ($c < ($maxTime * 1000 / $sleepTime)) With $PDFCreator .cDefaultprinter = $DefaultPrinter Sleep( 200) .cClose() EndWith If $ReadyState = 0 then Consolewrite ("Creating test page as pdf." & @CRLF & @CRLF & "An error is occured: Time is up!"& @CR) ProcessClose("PDFCreator.exe") EndIf ;--- $PDFCreator events --- Func PDFCreator_eReady() $ReadyState = 1 EndFunc Func PDFCreator_eError() Consolewrite ("An error is occured!" & @CRLF & @CRLF & _ "Error [" & $PDFCreator.cErrorDetail("Number") & "]: " & $PDFCreator.cErrorDetail("Description")& @CR) ;VA Wscript.Quit EndFunc ; Convert2PDF script ; Part of $PDFCreator ; License: GPL ; Homepage: http://www.sf.net/projects/pdfcreator ; Version: 1.0.0.0 ; Date: September, 1. 2005 ; Author: Frank Heindörfer ; Comments: This script convert a printable file in a pdf-file using the com interface of $PDFCreator. ; Translated by ptrex AutoItSetOption("MustDeclareVars", 1) Const $maxTime = 30 ; in seconds Const $sleepTime = 250 ; in milliseconds Dim $objArgs, $ifname, $fso, $PDFCreator, $DefaultPrinter, $ReadyState, _ $i, $c, $AppTitle, $Scriptname, $ScriptBasename, $File $fso = ObjCreate("Scripting.FileSystemObject") $Scriptname = $fso.GetFileName(@ScriptFullPath) $ScriptBasename = $fso.GetFileName(@ScriptFullPath) $AppTitle = "PDFCreator - " & $ScriptBasename $File = InputBox("FileName","Fill in the Path and filename","C:_AppsAutoIT3COMPDFCreatorVBScriptsGUI.vbs") $PDFCreator = ObjCreate("PDFCreator.clsPDFCreator") $PDFCreator.cStart ("/NoProcessingAtStartup") With $PDFCreator .cOption("UseAutosave") = 1 .cOption("UseAutosaveDirectory") = 1 .cOption("AutosaveFormat") = 1 ; 0=PDF, 1=PNG, 2=JPG, 3=BMP, 4=PCX, 5=TIFF, 6=PS, 7= EPS, 8=ASCII $DefaultPrinter = .cDefaultprinter .cDefaultprinter = "PDFCreator" .cClearcache() EndWith ; For $i = 0 to $objArgs.Count - 1 With $PDFCreator $ifname = $File ;"C:TmpTest.xls" ;$objArgs($i) If Not $fso.FileExists($ifname) Then MsgBox (0,"Error","Can't find the file: " & $ifname & @CR & $AppTitle) Exit EndIf If Not .cIsPrintable(String($ifname)) Then ConsoleWrite("Converting: " & $ifname & @CRLF & @CRLF & _ "An error is occured: File is not printable!" & @CRLF & $AppTitle & @CR) EndIf $ReadyState = 0 .cOption("AutosaveDirectory") = $fso.GetParentFolderName($ifname) .cOption("AutosaveFilename") = $fso.GetBaseName($ifname) .cPrintfile (String($ifname)) .cPrinterStop = 0 $c = 0 Do $c = $c + 1 Sleep ($sleepTime) Until ($ReadyState = 0) and ($c < ($maxTime * 1000 / $sleepTime)) If $ReadyState = 0 then ConsoleWrite("Converting: " & $ifname & @CRLF & @CRLF & _ "An error is occured: File is not printable!" & @CRLF & $AppTitle & @CR) Exit EndIf EndWith ;Next With $PDFCreator .cDefaultprinter = $DefaultPrinter .cClearcache() Sleep (200) .cClose() EndWith ProcessClose("PDFCreator.exe") ;--- $PDFCreator events --- Func PDFCreator_eReady() $ReadyState = 1 EndFunc Func PDFCreator_eError() MsgBox(0, "An error is occured!" , "Error [" & $PDFCreator.cErrorDetail("Number") & "]: " & $PDFCreator.cErrorDetail("Description")& @CR) EndFunc There are lot's of VBScript Examples distributed with the installation. As well as for other Scripting or Programming languages. Even for MS Office VBA So let's go and add your scripts to it. Enjoy !! ptrex
    1 point
×
×
  • Create New...