Jump to content

Leaderboard

Popular Content

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

  1. Thanks for the "like", TheDcoder. It is true that many messages from the Nazi machine were cracked. This was because of flaws in the system that Turning and his team exploited, which allowed them to work backwards to find the machine setup for that day. First, they could assume that text like "Hail Hitler" would appear toward the end of the message. Second, they could assume that no letter would encrypt to itself. For Example "t" would not encrypt to "t" Third, once a single message was cracked for the day, they could assume the same settings for the remainder of the day. Fortunately, my rendition has a few differences. Although based on the mechanics of the Enigma machine, I am not limited by the physical, so my version can potentially encode a character to itself. No assumptions can be made about the contents of one encrypted sample, and apply it to another as universally as containing a common phrase, or using the same configuration for each encryption during the day. The Enigma machine was limited to just letters and numbers, without upper and lower case differentiation. I am able to work with a full 256 characters in each byte of data, including non-printable characters. (exponentially more possibilities to try). That said, I might trust this for simple needs, but would not recommend it over modern encryption methods available, should higher security be needed.
    1 point
  2. I sprinkle my code with calls to this func. Disable/enable with a Ctrl-Q as needed. Shows me the Function , step, and multiple variable names and values on one line. (All of my Func have a "Local Const $ThisFunc = "Func Name" line right after the Func definition). #include-once ; ===================================================================== ; ; #include "HotRod\hr_Debug_Print.au3" ; ; Example Calls: ; ; hr_Debug_Print( $ThisFunc, "StepName", "MsgText", "$P1Name", $P1Value, ... ) ; hr_Debug_Print( $ThisFunc, "StepName", Default, "$P1Name", $P1Value, ... ) ; hr_Debug_Print( $ThisFunc, Default, Default, "$P1Name", $P1Value, ... ) ; ; hr_Debug_Print( $ThisFunc, "StepName", _ ; "MsgText", _ ; "$P1Name", $P1Value, ... ) ; ; ===================================================================== Func hr_Debug_Print( _ Const $FuncName = Default, _ $StepName = Default, _ $MsgText = Default, _ $P1Name = Default, $P1Value = Default, _ $P2Name = Default, $P2Value = Default, _ $P3Name = Default, $P3Value = Default, _ $P4Name = Default, $P4Value = Default, _ $P5Name = Default, $P5Value = Default, _ $P6Name = Default, $P6Value = Default, _ $P7Name = Default, $P7Value = Default, _ $P8Name = Default, $P8Value = Default, _ $P9Name = Default, $P9Value = Default _ ) Local $MsgStrg = "DEBUG_PRINT" If NOT ( ( $FuncName = Default ) OR ( $FuncName = "") ) Then $MsgStrg = $MsgStrg & " | " & $FuncName EndIf If NOT ( ( $StepName = Default ) OR ( $StepName = "") ) Then $MsgStrg = $MsgStrg & " | " & $StepName EndIf If NOT ( ( $MsgText = Default ) OR ( $MsgText = "") ) Then $MsgStrg = $MsgStrg & " | " & $MsgText EndIf If $P1Name <> Default Then $MsgStrg = $MsgStrg & " | " & $P1Name & ": '" & $P1Value & "'" If $P2Name <> Default Then $MsgStrg = $MsgStrg & " | " & $P2Name & ": '" & $P2Value & "'" If $P3Name <> Default Then $MsgStrg = $MsgStrg & " | " & $P3Name & ": '" & $P3Value & "'" If $P4Name <> Default Then $MsgStrg = $MsgStrg & " | " & $P4Name & ": '" & $P4Value & "'" If $P5Name <> Default Then $MsgStrg = $MsgStrg & " | " & $P5Name & ": '" & $P5Value & "'" If $P6Name <> Default Then $MsgStrg = $MsgStrg & " | " & $P6Name & ": '" & $P6Value & "'" If $P7Name <> Default Then $MsgStrg = $MsgStrg & " | " & $P7Name & ": '" & $P7Value & "'" If $P8Name <> Default Then $MsgStrg = $MsgStrg & " | " & $P8Name & ": '" & $P8Value & "'" If $P9Name <> Default Then $MsgStrg = $MsgStrg & " | " & $P9Name & ": '" & $P9Value & "'" ConsoleWrite( $MsgStrg & @CRLF ) EndFunc
    1 point
  3. Annoyingly, I don't see any difference between the x86 and x64 versions so making it hard for me to do any debugging/testing. Strange.... have looked in the source and can't find any reference to TCS_HOTTRACK in the sourcecode. Also there is no real difference in the source for x86 and x64 in any of the changes I made, so guess I need to look at the Compile/Link part of the project. I have made a couple of changes to the manifest which I now have made equal to the original build for testing. Could either of you you try these version of SciTEx86 and SciTEx64 and see whether that makes any change? ps: The issue I have with this test version is that when these standard lines are in the manifest: <dpiAware>true</dpiAware> <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness> The ICONS are tiny: PSS: Found the option: toolbar.large=1 to correct the small Iconbar Thanks Jos
    1 point
  4. ;~ Class Name: SciTeTabCtrl, Style Value: ;-------------------------------------------------------------------------------------------------------------------------------------------- ;~ Neil SciTEx64: TCS_HOTTRACK, TCS_MULTILINE, TCS_TOOLTIPS, TCS_FOCUSNEVER, WS_CHILD, WS_VISIBLE, WS_CLIPSIBLINGS, WS_CLIPCHILDREN ;~ SciTEx86: TCS_HOTTRACK, TCS_MULTILINE, TCS_TOOLTIPS, TCS_FOCUSNEVER, WS_CHILD, WS_VISIBLE, WS_CLIPSIBLINGS, WS_CLIPCHILDREN ;-------------------------------------------------------------------------------------------------------------------------------------------- ;~ jos SciTEx64: TCS_HOTTRACK, TCS_MULTILINE, TCS_TOOLTIPS, TCS_FOCUSNEVER, WS_CHILD, WS_VISIBLE, WS_CLIPSIBLINGS, WS_CLIPCHILDREN ;~ SciTEx86: TCS_MULTILINE, TCS_TOOLTIPS, TCS_FOCUSNEVER, WS_CHILD, WS_VISIBLE, WS_CLIPSIBLINGS, WS_CLIPCHILDREN ;~ SciTE4AutoIt3: TCS_MULTILINE, TCS_TOOLTIPS, TCS_FOCUSNEVER, WS_CHILD, WS_VISIBLE, WS_CLIPSIBLINGS, WS_CLIPCHILDREN ;~ SciTE4AutoIt3_Portable: TCS_MULTILINE, TCS_TOOLTIPS, TCS_FOCUSNEVER, WS_CHILD, WS_VISIBLE, WS_CLIPSIBLINGS, WS_CLIPCHILDREN ;--------------------------------------------------------------------------------------------------------------------------------------------
    1 point
  5. Update! Refined and put together the entire battle animation code and have it running a lot smoother now. The battle system also works fully from start to finish, as far as turn cycling and damage/HP calculation. Still have some glitches in animation that need to be smoothed out (later). Also tweaked the free-roam mode a little, made walking speed faster and played with more boundaries (overlapping and can't walk over objects). I definitely need to make better walking/running animations, and may also increase the distance-per-step when walking in free-roam. Next, I'm just going to spend some time tying up some loose ends, and getting some other things functioning before diving into more uncoded territory. There is a good deal more stuff to be done for free-roam mode, as well as battle mode (And future alternative modes of battle), also need to start getting used to Reaper and its Cockos Synthesizer to start making some sounds/tunes for this. (We'll see how that goes haha!) Also put together a (much better) preview video (in spoiler below). I used ShareX (recommended by @TheDcoder) for screen recording this time, and finally figured out the Kdenlive editor so no more CoolCut water marks! I'll bounce back and forth between ShareX and OBS for future video stuff. (Game and non-game related!). I posted video link short cuts in the original post of this thread as well as below. (And again, YouTube quality sucks)
    1 point
  6. I can confirm that using the file from SciTEx64.zip fixes the tab problem for me too.
    1 point
  7. of these only SciTEx64.zip has a brighter tab [ ] SciTE4AutoIt3.exe 2023-10-02 15:16 6.4M [ ] SciTE4AutoIt3_Portable.zip 2023-10-02 15:16 8.8M [ ] SciTEx64.zip 2023-10-02 09:39 1.3M [ ] SciTEx86.zip 2023-10-02 09:39 1.1M from https://www.scintilla.org/SciTE.html both 32 & 64, has a brighter tab
    1 point
  8. Musashi

    Which Debugger do you use?

    There are some beneficial keyboard shortcuts for debugging. Example : Local $iCount = 0 For $i = 1 To 5 $iCount += $i * 2 Next Place the mouse cursor on the $iCount variable in the loop. Now use ALT-D (without the - character, of course ). This will automatically insert a ConsoleWrite statement. With CTRL-SHIFT-D a MsgBox is inserted analogously. With CTRL-ALT-Z all lines inserted in this way can be removed.
    1 point
  9. The full version of SciTE also has a very useful trace feature with ConsoleLog, I've used it several times to track tricky bugs.
    1 point
  10. Keep in mind, that the password is decryptable. https://keithga.wordpress.com/2013/12/19/sysinternals-autologon-and-securely-encrypting-passwords/ The head line "LSA secrets" and below will explain this concern.
    1 point
  11. smbape

    GTK4 UDF

    After EmguCV (OpenCV wrapper) UDF , I wanted to improve the concept of generating autoit udf bindings from c/c++ source files. GTK was a project that get my attention. That means: It is a heavy UDF with more that 8900 functions since they were generated from the gtk source files Complex gtk applications can be done with the UDF Functions keep the same name as in the source files prefixed with an underscore. The project is available here Prerequisites Download and extract gtk-autoit-bindings-v1.0.0-rc.0.7z into a folder Download and extract gtk-windows-4.3.2.7z into a folder Examples The classic Hello World #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Opt("MustDeclareVars", 1) #Region ; when you don't know where the functions are ; - include all files ; - use Ctrl+J at each function to go to their location ; - add an include of the located file ; - redo until all your functions are found ; - then you can remove the include of gtk_all.au3 which is two times slower to start with ; #include "gtk-autoit-bindings\gtk_all.au3" #EndRegion ; when you don't know where the functions are #Region ; when you know where the functions are #include "gtk-autoit-bindings\include\glib-2.0\gio\gapplication.au3" #include "gtk-autoit-bindings\include\glib-2.0\gobject\gobject.au3" #include "gtk-autoit-bindings\include\gtk-4.0\gtk\gtkapplication.au3" #include "gtk-autoit-bindings\include\gtk-4.0\gtk\gtkapplicationwindow.au3" #include "gtk-autoit-bindings\include\gtk-4.0\gtk\gtkbutton.au3" #include "gtk-autoit-bindings\include\gtk-4.0\gtk\gtkwindow.au3" #EndRegion ; when you know where the functions are #include "gtk-autoit-bindings\gtk_callback.au3" #include "gtk-autoit-bindings\gtk_extra.au3" _Gtk_Open("gtk-windows-4.3.2\bin") main() _Gtk_Close() Func print_hello($widget, $data) ConsoleWrite("Hello World" & @CRLF) EndFunc ;==>print_hello Func activate($app, $user_data) Local $window = _gtk_application_window_new($app) _gtk_window_set_title($window, "Window") _gtk_window_set_default_size($window, 200, 200) Local $button = _gtk_button_new_with_label("Hello World") _g_signal_connect($button, "clicked", _gtk_callback("print_hello"), NULL) _gtk_window_set_child($window, $button) _gtk_window_present($window) EndFunc ;==>activate Func main() Local $app = _gtk_application_new("com.autoitscript.gtk.example", $G_APPLICATION_FLAGS_NONE) _g_signal_connect($app, "activate", _gtk_callback("activate"), NULL) Local $status = _g_application_run($app, 0, 0) _g_object_unref($app) EndFunc ;==>main A more complex one #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; Sources: ; https://docs.gtk.org/gtk4/getting_started.html#packing-buttons-with-gtkbuilder Opt("MustDeclareVars", 1) #Region ; when you don't know where the functions are ; - include all files ; - use Ctrl+J at each function to go to their location ; - add an include of the located file ; - redo until all your functions are found ; - then you can remove the include of gtk_all.au3 which is two times slower to start with ; #include "gtk-autoit-bindings\gtk_all.au3" #EndRegion ; when you don't know where the functions are #Region ; when you know where the functions are #include "gtk-autoit-bindings\include\glib-2.0\gio\gapplication.au3" #include "gtk-autoit-bindings\include\glib-2.0\gio\gfile.au3" #include "gtk-autoit-bindings\include\glib-2.0\glib\gmem.au3" #include "gtk-autoit-bindings\include\glib-2.0\gobject\gobject.au3" #include "gtk-autoit-bindings\include\gtk-4.0\gtk\gtkapplication.au3" #include "gtk-autoit-bindings\include\gtk-4.0\gtk\gtkbuilder.au3" #include "gtk-autoit-bindings\include\gtk-4.0\gtk\gtkscrolledwindow.au3" #include "gtk-autoit-bindings\include\gtk-4.0\gtk\gtkstack.au3" #include "gtk-autoit-bindings\include\gtk-4.0\gtk\gtktextbuffer.au3" #include "gtk-autoit-bindings\include\gtk-4.0\gtk\gtktextview.au3" #include "gtk-autoit-bindings\include\gtk-4.0\gtk\gtkwidget.au3" #include "gtk-autoit-bindings\include\gtk-4.0\gtk\gtkwindow.au3" #EndRegion ; when you know where the functions are #include "gtk-autoit-bindings\gtk_callback.au3" #include "gtk-autoit-bindings\gtk_extra.au3" Local $application = DllStructCreate("ptr window; ptr stack") _Gtk_Open("gtk-windows-4.3.2\bin") main() _Gtk_Close() Func application_init($app) ; Construct a GtkBuilder instance and load our UI description Local $builder = _gtk_builder_new() _gtk_builder_add_from_file($builder, "window.ui", Null) $application.window = _gtk_builder_get_object($builder, "window") $application.stack = _gtk_builder_get_object($builder, "stack") ; We do not need the builder any more _g_object_unref($builder) _gtk_window_set_application($application.window, $app) EndFunc ;==>application_init Func activate($app, $user_data) application_init($app) ; show these files by default Local $argv[2] = ["main.au3", "window.ui"] Local $file For $i = 0 To UBound($argv) - 1 $file = _g_file_new_for_path($argv[$i]) open_file($file) _g_object_unref($file) Next _gtk_window_present($application.window) EndFunc ;==>activate Func open_file($file) Local $contents = DllStructCreate("ptr value") Local $length = DllStructCreate("uint64 value") Local $basename = _g_file_get_basename($file) Local $scrolled = _gtk_scrolled_window_new() _gtk_widget_set_hexpand($scrolled, True) _gtk_widget_set_vexpand($scrolled, True) Local $view = _gtk_text_view_new() _gtk_text_view_set_editable($view, False) _gtk_text_view_set_cursor_visible($view, False) _gtk_scrolled_window_set_child($scrolled, $view) _gtk_stack_add_titled($application.stack, $scrolled, $basename, $basename) If _g_file_load_contents($file, Null, $contents, $length, Null, Null) Then Local $buffer = _gtk_text_view_get_buffer($view) _gtk_text_buffer_set_text($buffer, $contents.value, $length.value) _g_free($contents.value) EndIf _g_free($basename) EndFunc ;==>open_file Func open($app, $files, $n_files, $hint) Local $windows = _gtk_application_get_windows($app) Local $win If $windows Then $windows = DllStructCreate($tagGList, $windows) $win = $windows.data Else application_init($app) $win = $application.window EndIf $files = DllStructCreate("ptr value[" & $n_files & "]", $files) For $i = 1 To $n_files open_file($files.value(($i))) Next _gtk_window_present($win) EndFunc ;==>open Func main() Local $argc = UBound($CmdLine) Local $argv = DllStructCreate("ptr value[" & $argc & "]") ; create an array to keep reference to structs until the end of the function Local $tmp[$argc] Local $str For $i = 0 To $argc - 1 $str = $CmdLine[$i] $tmp[$i] = DllStructCreate("char value[" & BinaryLen(StringToBinary($str)) + 1 & "]") $tmp[$i].value = $str $argv.value(($i + 1)) = DllStructGetPtr($tmp[$i]) Next Local $app = _gtk_application_new("com.autoitscript.gtk.example", $G_APPLICATION_HANDLES_OPEN) _g_signal_connect($app, "activate", _gtk_callback("activate"), Null) ; _g_signal_connect($app, "open", _gtk_callback("open", "none:cdecl", "ptr;ptr;int;str"), Null) ; on windows, argv is completely ignored ; it is directly taken from the command line ; see https://gitlab.gnome.org/GNOME/glib/-/blob/2.69.2/gio/gapplication.c#L2460 Local $status = _g_application_run($app, $argc, $argv) _g_object_unref($app) Return $status EndFunc ;==>main window.ui <?xml version="1.0" encoding="UTF-8"?> <interface> <object id="window" class="GtkWindow"> <property name="title" translatable="yes">Example Application</property> <property name="default-width">600</property> <property name="default-height">400</property> <child type="titlebar"> <object class="GtkHeaderBar" id="header"> <child type="title"> <object class="GtkStackSwitcher" id="tabs"> <property name="stack">stack</property> </object> </child> </object> </child> <child> <object class="GtkBox" id="content_box"> <property name="orientation">vertical</property> <child> <object class="GtkStack" id="stack"/> </child> </object> </child> </object> </interface> More examples are available here A note on performance Before trying to convert everything to the autoit equivalent, keep in mind that autoit is slow when dealing with loops. For that reason, I recommend to create a dll that export functions that do the loops. autoit-addon is a dll project example.
    1 point
  12. Ok. Added changes to version 2.98 and attached modified ComUDF.au3 as of version 2.99. Changes: ComUDF.au3
    1 point
  13. Anyone interested in controlling the serial ports directly via kernel32 functions? You need the following file "cfx.ini" with the settings of the used comm port [Comm] CommPort=1 CommBaud=9600 CommParity=0;0=none, 1=odd, 2=even, 3=mark, 4=space CommBits=8;4-8 CommStop=1;0=0, 1=1,5, 2=2 CommCtrl=0x0011 LogDir="" Debug=1 I spent much time to find an alternative to mscomm32 or other udfs using a dll. The test script sends a reset to a modem and shows the response. Sending chr(0) is possible, but I have to find a solution to receive chr(0). With the settings above (CommCtrl) the serial port is able to receive chr(0), the "BytesReceived" value shows that a character was received. The problem is, that chr(0) marks the end of a string. Questions: Does it works with Win98 or Vista? Any comments are welcome. Uwe cfxtest0.au3 cfx.au3
    1 point
  14. Ah ok, thanks a lot. I thought that this option would be enabled by default.
    1 point
  15. Add this to the top of the script: #pragma compile(AutoItExecuteAllowed, true) Jos
    1 point
×
×
  • Create New...