Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/06/2023 in all areas

  1. GuiBuilderPlus GuiBuilderPlus is a small, easy to use GUI designer for AutoIt. Originally created long ago as AutoBuilder by the user CyberSlug, enhanced as GuiBuilder by TheSaint, and further enhanced and expanded as GuiBuilderNxt by jaberwacky, GuiBuilderPlus is a continuation of their great work, with a focus on increased stability and usability followed by new features. ------ Yes, I have decided to bring back our old friend the GuiBuilder. This utility has a long history, which you can read about in TheSaint's Gui Creators topic, starting all the back back with CyberSlug's AutoBuilder. Even though I've hacked the original code to pieces in order to document and better understand what is going on, the essence of GuiBuilder still lives on! I am using the awesome updates from GuiBuilderNxt by jaberwacky as a starting point since he already did a lot of the hard work of parsing and updating the original code, plus I really like the layout that came about from that update. Unfortunately development seems to have stopped in 2016. Not sure how much interest there is in this, but suggestions and bug reports are welcome. See Full Changelog: Download the latest version: v1.3.0 (2024-03-24) GuiBuilderPlus v1.3.0 - 2024-03-24.zip FIXED: Wrong line endings when copying from code preview window FIXED: Issue changing properties when Obect Explorer window is not open FIXED: Issue when selecting controls under certain other conditions FIXED: SaveAs keyboard shortcut FIXED: Undo/Redo for Global property ADDED: Auto-size property for Labels, Buttons, and Inputs GitHub Repository: https://github.com/KurtisLiggett/GuiBuilderPlus
    1 point
  2. That isn't an error. It is just a warning display in the webdriver console, and it is the result of calling _WD_CreateSession without supplying a Capabilities string. FWIW, the code ran fine for me.
    1 point
  3. ioa747

    Switcher

    and this make pause status more visible Func Enabled() If $Enabled = True Then TraySetIcon(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", $STR_NOCASESENSEBASIC, -1) - 1) & "\Icons\MyAutoIt3_Red.ico") $Enabled = False $SleepTime = 1000 HotKeySet("1") Else TraySetIcon(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", $STR_NOCASESENSEBASIC, -1) - 1) & "\Icons\MyAutoIt3_Blue.ico") $Enabled = True $SleepTime = 10 HotKeySet("{ESC}", "Enabled") HotKeySet("1", "start") EndIf EndFunc ;==>Enabled
    1 point
  4. ioa747

    Switcher

    with a second review, as long as it is in the HotKeySet function Func start() ; While $Enabled Sleep(10) If _IsPressed("90") Then ; 90 NUM LOCK key Sleep(50) Send("Its") Sleep(200) Send("a simply") Sleep(200) Send("text") Sleep(150) EndIf WEnd EndFunc ;==>start
    1 point
  5. ioa747

    Switcher

    While 1 Sleep(10) If $Enabled = True Then If _IsPressed("90") Then ; 90 NUM LOCK key Sleep(50) Send("Its") Sleep(200) Send("a simply") Sleep(200) Send("text") Sleep(150) EndIf EndIf WEnd
    1 point
  6. ptrex

    COM Midi-OX Scripting

    What is MIDI-Scripting? First, a little explanation on what you can do with MIDI-Scripts. You can write a script that tells MIDI Device how to act based on the MIDI input message it receives. Or the other way around you can send MIDI messages from a MIDI Device to a MIDI compatible software, And script the behavior accordingly. Writing your own MIDI-Script allows you to execute custom actions, such as play/pause, start/stop recording, .... MIDI protocol The protocol is based on messages. A MIDI message is an instruction that controls some aspect of the receiving Device. You have short messages (3 bytes) and system Exclusive messages (byte arrays). the exclusive messages are also called SysEx messages. Why needing this? Apart from controlling music device, you can also you this controlling other types of devices and even software. Most of them are music media related. AutoIt MIDI software : - MIDI library - Peace Equalizer MIDI-OX Com library : MIDI-OX is a versatile utility that is great for troubleshooting MIDI hardware devices. It also acts as a System Exclusive SysEx librarian, which allows you to send (dump) and receive SysEx data. Nevertheless this is quite old software, it is still alive and kicking. Mentioned many times on the internet as the Swiss Army knife for debugging input and output MIDI messages. It has a GUI interface but as well is has COM interface. Download here : I wrote a quick example to convert the it to AutoIT #AutoIt3Wrapper_UseX64=N #include <MsgBoxConstants.au3> ; Initialize SvenP 's error handler $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ;~ Create object Local $mox = ObjCreate("MIDIOX.MOXScript.1") ; Custom sink object Local $oMoxEvents = ObjEvent($mox, "OnTrigger_") Local $Now = $mox.GetSystemTime $mox.Sleep(2500) If $mox.GetSystemTime Then ConsoleWrite("At least 2½ second has passed" & @CRLF) EndIf Local $n1 = $mox.InstanceCount Local $n2 = $mox.InstanceNumber ConsoleWrite("Instances : " & $n2 & " " & $n2 & @CRLF) $mox.FireMidiInput = 1 ; begins input $mox.DivertMidiInput = 1 ; when set, routes all data MsgBox (0,"Midi-OX","Press OK to end MIDI Loop") ; sits in a message loop ; ----------------------------------------------------------- ;This is the function that gets called by MIDI-OX Func OnTrigger_MidiInput( $timestamp, $status, $chan, $dat1, $dat2) ; ship it right back $mox.OutputMidiMsg ($status + $chan, $dat1, $dat2) EndFunc ; ----------------------------------------------------------- ; The MIDI Input Devices Local $str = "Sys MIDI Input Devices: " & $mox.SysMidiInCount Local $strWrk = $mox.GetFirstSysMidiInDev while $strWrk <> "" $str = $str & @CRLF & " " & $strWrk $strWrk = $mox.GetNextSysMidiInDev Wend ConsoleWrite(@CRLF) ConsoleWrite($Str & @CRLF) ConsoleWrite(@CRLF) ; ----------------------------------------------------------- ; The MIDI Input Devices Local $str = "Sys MIDI Output Devices: " & $mox.SysMidiOutCount Local $strWrk = $mox.GetFirstSysMidiOutDev while $strWrk <> "" $str = $str & @CRLF & " " & $strWrk $strWrk = $mox.GetNextSysMidiOutDev Wend ConsoleWrite(@CRLF) ConsoleWrite($Str & @CRLF) ConsoleWrite(@CRLF) ; ----------------------------------------------------------- ; The MIDI Next Open Input Device Local $str = "Open MIDI Input Devices: " & $mox.OpenMidiInCount Local $strWrk = $mox.GetFirstOpenMidiInDev while $strWrk <> "" $id = $mox.GetInPortID( $strWrk ) $name = $mox.GetInPortName( $strWrk ) $str = $str & @CRLF & " " & $strWrk & " " & $id & " " & $name $strWrk = $mox.GetNextOpenMidiInDev Wend ConsoleWrite(@CRLF) ConsoleWrite($Str & @CRLF) ConsoleWrite(@CRLF) ; ----------------------------------------------------------- ; The MIDI Next Open Output Device Local $str = "Open MIDI Output Devices: " & $mox.OpenMidiOutCount Local $strWrk = $mox.GetFirstOpenMidiOutDev while $strWrk <> "" $id = $mox.GetOutPortID( $strWrk ) $name = $mox.GetOutPortName( $strWrk ) $str = $str & @CRLF & " " & $strWrk & " " & $id & " " & $name $strWrk = $mox.GetNextOpenMidiOutDev Wend ConsoleWrite(@CRLF) ConsoleWrite($Str & @CRLF) ConsoleWrite(@CRLF) MsgBox (0,"Midi-OX","Press OK to end MIDI-OX version : " ) If MsgBox($MB_OKCANCEL, "Shutdown?", "OK to exit MIDI-OX version " & $mox.GetAppVersion ) = 1 Then $mox.ShutdownAtEnd = 1 $mox.FireMidiInput = 0 ; stops MIDI input $mox.DivertMidiInput = 0 Else $mox.ShutdownAtEnd = 0 EndIf Func MyErrFunc() $HexNumber=hex($oMyError.number,8) Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & $HexNumber & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) SetError(1) ; to check for after this function returns Endfunc Testing Even if you do not have any hardware at your disposal, you can use this LoopBack MIDI driver. This software can be used to create virtual loopback MIDI-ports to interconnect applications on Windows, that want to open hardware-MIDI-ports for communication. Download here : https://www.tobias-erichsen.de/software/loopmidi.html MIDI Protocol Documentation (video) A must see short video series in order to understand the basics of the MIDI protocol Especially Part 1 / 2 / 4 / 5 / 7 are most valuable to get a good understanding. MIDI Part 1 - MIDI Signal Path - YouTube MIDI Part 2 - MIDI Message Types - YouTube MIDI Part 3 - DIN MIDI - YouTube MIDI Part 4 - MIDI Protocol Details - YouTube MIDI Part 5 - Channel Messages - YouTube MIDI Part 6 - MIDI Clock - YouTube MIDI Part 7 - SYSEX, etc. - YouTube Enjoy !
    1 point
  7. @senatin using your above code (2D Array) = ( If / Switch / Select / Do...Until / While...WEnd / Recursion ) method #include <Array.au3> Local $Search_Value = 2 Local $test[3][4] = [[3, 0, 5, 2],[1,4,7],[6,8]] _ArrayDisplay($test) ConsoleWrite('> test 1 (using If)' & @crlf) For $i = 0 To UBound($test, 1)-1 For $k = 0 To UBound($test, 2)-1 If $test[$i][$k] = $Search_Value Then ConsoleWrite('$test[' & $i & '][' & $k & ']' & @crlf) ExitLoop 2 EndIf Next Next ConsoleWrite('> test 2 (using Switch)' & @crlf) For $i = 0 To UBound($test, 1)-1 For $k = 0 To UBound($test, 2)-1 Switch $test[$i][$k] Case $Search_Value ConsoleWrite('$test[' & $i & '][' & $k & ']' & @crlf) ExitLoop 2 Case Else EndSwitch Next Next ConsoleWrite('> test 3 (using Select)' & @crlf) For $i = 0 To UBound($test, 1)-1 For $k = 0 To UBound($test, 2)-1 Select Case $test[$i][$k] = $Search_Value ConsoleWrite('$test[' & $i & '][' & $k & ']' & @crlf) ExitLoop 2 Case Else EndSelect Next Next ConsoleWrite('> test 4 (Do Until)' & @crlf) Local $i = 0 Local $k = 0 Local $row = UBound($test, 1) Local $col = UBound($test, 2) Do If $test[$i][$k] = $Search_Value Then ConsoleWrite('$test[' & $i & '][' & $k & ']' & @crlf) ExitLoop EndIf $k = $k + 1 If $k = $col Then $i = $i + 1 $k = 0 EndIf Until $i = $row ConsoleWrite('> test 5 (While Loop)' & @crlf) Local $i = 0 Local $k = 0 Local $row = UBound($test, 1) Local $col = UBound($test, 2) While 1 If ($i = $row) Then ExitLoop If ($test[$i][$k] = $Search_Value) Then ConsoleWrite('$test[' & $i & '][' & $k & ']' & @crlf) ExitLoop EndIf $k = $k + 1 If $k = $col Then $i = $i + 1 $k = 0 EndIf WEnd ConsoleWrite('> test 6 (Recursion Method)' & @crlf) __Recursion_Method($test, 0, 0, $Search_Value) Func __Recursion_Method(ByRef $oArray, $i = 0, $k = 0, $oValue = 0) Local $row = UBound($oArray, 1) Local $col = UBound($oArray, 2) - 1 If ($i = $row) Then Return If $oArray[$i][$k] = $oValue Then ConsoleWrite('$test[' & $i & '][' & $k & ']' & @crlf) Return EndIf If $k = $col Then $i = $i + 1 $k = 0 Else $k += 1 EndIf __Recursion_Method($oArray, $i, $k, $oValue) EndFunc
    1 point
×
×
  • Create New...