Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/10/2021 in all areas

  1. Attached is a full Controller for SONY Cameras using the VISCA protocol, written in AutoIt. Everything required to build a EXE file is included. I wrote this software because I couldn't find decent control software for these cameras, I tried at least a dozen packages. So in my mind, anyway, it is better than anything else out there. The software will also controls several other pieces of AV equipment. The software is very specific to my application but should be easy to adapt and would make a good starting point for someone else trying to roll there own Audio Video control program. It features the following; Unlimited number of presets Macros to combine recall of presets Supports JoyStick control Supports up to 7 cameras in Daisy chain configuration. Unique Pan Tilt control pad provides variable speed control by dragging Mouse on pad, makes the cameras easy to control. Web Server allows Macros to be activated from OBS Studio Modular structure should make the code adaptable to other camera control protocols. Modular structure should make additional hardware support easy to add or remove. Will show errors during start up if hardware is not present but it will run. Serial ports configured with included INI file. Joystick response can be adjusted through settings in the INI file. Lots of documentation on how things are setup in the various source modules. Built in web server allows control from OBS Studio. Lots more documentation available wiring instructions, protocol documents for hardware etc. but that would exceed file upload size. PM me if you are interested. And thanks to everyone on this forum that provided the many libraries and bits of software used to make this project work. I couldn't have done it without the many contributors to this forum. I did my best to give the appropriate credit in each module. GeorgeController.zip Operation Instructions.pdf
    1 point
  2. Dear forum members, I have made a clear step by step tutorial for ControlClick functions together with AU3info. I had struggled a lot with controlclick function and with help in forum I managed it to understand function ControlClick. Because it was so difficult I made this step by step guide. I made it to help others with problems in ControlClick and AU3info. Have fun with it. I would like to thank Jos especially for his great help. Without him I would never managed it to make script with ControClick. ControlClick Tutorial.pdf
    1 point
  3. New version uploaded. Click HERE to see version history.
    1 point
  4. Here's another possible solution. Since I don't know your language and the rules for how characters are translated from ANSI to UTF-8, I just used my own rules as an example. Also since I don't know your language, I'm not sure if trying to do it this way is even possible. Other than adding logic to the _DB_Fix() function and writing output to a GUI console instead of MsgBoxes, the script is exactly the same as your original script. Output: 36: Tytuł: to jest treść testowa ($DATA0) 0x54797475C5823A20746F206A65737420747265C59BC48720746573746F7761 41: 0x547974756C3A20746F206A65737420747265736320746573746F7761 ($FAKE_DATA_BASE) 45: Tytul: to jest tresc testowa ($DATA1) 0x547974756C3A20746F206A65737420747265736320746573746F7761 53: Tytul: to jest tresc testowa ($DATA2) 0x547974756C3A20746F206A65737420747265736320746573746F7761 ===== After DB Fix ===== $DATA0 = Tytuł: to jest treść testowa = 0x54797475C5823A20746F206A65737420747265C59BC48720746573746F7761 $DATA3 = Tytuł: to jest treść testowa = 0x54797475C5823A20746F206A65737420747265C59BC48720746573746F7761 ($DATA0 == $DATA3) = True
    1 point
  5. @mLipok I have the exact same questions as @pixelsearch in his good answer above. When you say it displays as tytuďż˝u: you don't tell us what exactly you look at: a DOS display (which codepage?), a Windows display (which codepage?), a SciTE display (which codepage?)! I understand your initial issue and I have the same here where an old program I use 100 times a day shows "ANSIfied UTF8 text" as the program doesn't cope with UTF8. I've written a little AutoIt program to convert the clipboard content from " UTF16 string containing UTF8 data" back to UCS2. I didn't bother to handle codepoints beyond UCS2 because I never get such content. I insisted to handle the low-level conversion on a "UTF8-sequence" basis over 2 or 3 bytes. I had to first replace sequences " " ( then 0x20) by " " ( then 0xA0), and "à " (à then 0x20) by "à " (à then 0xA0) and also double single quotes to make them transparent to AutoIt string processing, hence the 3 nested StringReplace(). Mabe you can adapt the idea to your use case. HotKeySet("!w", _unUTFme) HotKeySet("^!w", _Exit) While 1 Sleep(250) WEnd Func _Exit() Exit EndFunc Func _unUTFme() ClipPut(Execute("'" & StringRegExpReplace(StringReplace(StringReplace(StringReplace(ClipGet(), " ", " "), "à ", "à"), "'", "''"), "([\xC0-\xDF].|[\xE0-\xEF]..)", "' & _UnUTF8('$1') & '") & "'")) EndFunc Func _UnUTF8($s) Local $a = StringToASCIIArray($s) Local $c If UBound($a) = 2 Then $c = BitOR(BitShift(BitAND($a[0], 0x1F), -6), BitAND($a[1], 0x3F)) Else $c = BitOR(BitShift(BitAND($a[0], 0x3F), -12), BitOR(BitShift(BitAND($a[1], 0x3F), -6), BitAND($a[2], 0x3F))) EndIf Return ChrW($c) EndFunc
    1 point
  6. Hi mLipok I wonder if it's possible to revert the encoding, please have a look at this : The letter ł (l with stroke) in $DATA0 has a Unicode code of 322 (decimal) as returned by AscW("ł") When it was wrongly encoded using the ANSI flag, then its Ascii code was used, which is 108 (0x6C) as returned by Asc("ł") Which means that "ł" has become an "l" (small letter l) and its Ascii code is displayed in MsgBox at line 13 of your script: $FAKE_DATA_BASE = 0x747974756C753A At this point, it seems impossible to reverse anything because the unicode code 322 doesn't exist anymore in the binary data. There is something I didn't understand when you say that you have this kind of display on your computer : tytuďż˝u: The only obscure display I can reproduce on my computer happens when I change Scite encoding properties (menu File => Encoding) from UTF8 to Code Page Property (ANSI) then "tytułu:" is displayed "tytuÅ‚u:" in the script. Explanation : Å is character Ascii 197 (0xC5) and ‚ is character ascii 130 (0x82) which is "a single low quotation mark" This corresponds to an encoding of "0x74797475C582753A" which is the correct binary data when encoding is done using UTF8 flag (as ł unicode's code 322 will be correctly encoded to 0xC582 in UTF8) Maybe our locales are different and that could explain the tytuďż˝u: display on your computer ? I hope you'll have other suggestions that will help you.
    1 point
  7. Maybe this : #AutoIt3Wrapper_icon=lock.ico #include"_TC.au3" _TC_Path("C:\Program Files\TrueCrypt\TrueCrypt.exe") $result = True If DriveStatus("S:\") <> "INVALID" Then ;Check if we're already mounted $result = True Else $result = _TC_Mount("C:\SecureDrive\SecDrive.tc", "S") EndIf If $result Then $PID = ProcessExists("googledrivesync.exe") ; Will return the PID or 0 if the process isn't found. If Not $PID Then $result = Run("C:\Program Files\Google\Drive\googledrivesync.exe") If Not $result Then Exit MsgBox(0, "Error", "Could not load GoogleDrive", 5) EndIf $PID = ProcessExists("SkyDrive.exe") If Not $PID Then $result = Run("C:\Users\Admin\AppData\Local\Microsoft\OneDrive\SkyDrive.exe") If Not $result Then Exit MsgBox(0, "Error", "Could not load OneDrive", 5) EndIf Else MsgBox(0, "Mount Cancelled", "Secure Partition has not been mounted.", 1) EndIf I will leave you the pleasure of doing the unmount counterpart.
    1 point
  8. @mLipok What do you get when you run this script on your PC? #include <MsgBoxConstants.au3> #include <StringConstants.au3> Global $strANSI = "tytułu:", _ $bstrANSI = Binary($strANSI), _ $strUTF8 = BinaryToString($bstrANSI, $SB_UTF8) MsgBox($MB_ICONINFORMATION, "Encondings:", "$strANSI = " & $strANSI & @CRLF & _ "$bstrANSI = " & $bstrANSI & @CRLF & _ "$strUTF8 = " & $strUTF8) This is what I see:
    1 point
  9. JLogan3o13

    First Scripts

    Wish there was an "Amen" like.
    1 point
  10. Given that AutoIt is an interpreted language, I seriously doubt that you can get anywhere near a 250ns pause. On a 64-bit Windows 7 Pro OS, with an Intel i5 @ 3.1ghz, and no other apps running (only services), the following lines yield around a 4500ns diff. That is just the time it takes to initialize a timer and then do an immediate time difference. So in a loop, and depending on what else is running on the PC, the results would be an even bigger difference. Another way to look at is that you are most likely seeing a bigger pause than 250ns when you execute your commands back to back, without any Sleep function. $hTimer = TimerInit() $nDiff = TimerDiff($hTimer) MsgBox(0, "", "msecs = " & $nDiff & @CRLF & "nsecs = " & ($nDiff * 1000000))
    1 point
×
×
  • Create New...